multiple wordlists from the command line?

David Relson relson at osagesoftware.com
Sun Apr 24 14:31:43 CEST 2005


On Sat, 23 Apr 2005 22:54:45 -0700
Chris Fortune wrote:

> >   bogofilter --wordlist=R,user,~/wordlist.db,1 --wordlist=R,system,/var/spool/bogofilter/wordlist.db,1
> 
> thanks David.  it works well on the command line, but when executed from a perl script I get this error message:
> 
>      $res2 = `/usr/local/bin/bogofilter -T -x
> c --wordlist=R,system,/home/defaultuser/.bogofilter/wordlist.db,1 --wordlist=R,user,/home/defaultuser/.bogofilter/$uid/wordlist.db,1
> < $temp_file 2>&1`;
>     print $res2;
>     "Can't find HOME or BOGOFILTER_DIR in environment."
> 
> any ideas?

Hi Chris,

The message means that bogofilter is looking for environment variables
$HOME and $BOGOFILTER_DIR and can find neither one.  How are you
running the perl script?  Is either of the the environment variables
present?

I've replicated your script and it runs fine from my command line, so
there's nothing inherently bad about using perl.

Since you're using absolute paths, bogofilter may be checking the
environment when it isn't necessary.  I'll check into that.

If you're building from source, try hacking file bogoconfig.c and
removing the "if (!check_bogohome) { ... }" conditional in lines 196 to
199.

I'm assuming that you're using either 0.94.4 or 0.94.5, which have the
new bfpath code.  If not, get 0.94.5!!!

HTH,

David



More information about the Bogofilter mailing list