Can't find $HOME.
David Relson
relson at osagesoftware.com
Sun Nov 10 04:39:50 CET 2002
At 09:09 PM 11/9/02, Jim wrote:
>I just upgraded to 0.8.0 and now bogofilter is lost and can't find it's
>HOME! I get the error when it is called:
>Can't find $HOME.
>I have to disable bogofilter now to recieve email.
>
>In looking thru the NEWS, is this because of the new feature of the file
>bogofilter.cf? I copied it to
>/usr/local/etc & also to /etc. Any ideas?
>
>Using FreeBSD4.7
Hi Jim,
I've looked over the code more closely and have additional information for
you. Also two suggested workarounds and a patch. I think we can get you
up and running :-)
In Linux where the code was developed, environment variable HOME points to
the users home directory. Bogofilter 0.8.0 looks for configuration files
in /etc/bogofilter and then in ~/.bogofilter. The code for resolving
~/.bogofilter currently _requires_ that environment variable HOME be present.
There are two workarounds available to you. The first is to define the
environment variable to point to your home directory. The second is to
create an /etc/bogofilter.cf file and define your own location for the
second config file. For example,
user_config_file=/home/jim/.bogofilter.cf
(or something similar) would work.
The patch below will cause bogofilter to skip reading the user config file
when $HOME is not define.
Hope this helps.
David
Index: config.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/config.c,v
retrieving revision 1.3
diff -r1.3 config.c
156,157c156
< fprintf( stderr, "Can't find $HOME.\n" );
< exit(2);
---
> return;
More information about the Bogofilter
mailing list