Can't find $HOME.

Jim jim at jtackett.com
Sun Nov 10 21:22:41 CET 2002


I'm invoking bogofilter thru a bash script.

I set an env variable of QMAILQUEUE in my /var/qmail/supervise/smtpd/run
file; I'm using tcpserver.  (I did have it in my tcp.smtp file like the
documents say; either way it still works.)

QMAILQUEUE="/usr/local/bin/qfilters.sh"
export QMAILQUEUE

The env QMAILQUEUE variable calls a bash script with qmail-qfilter invoking
the bogofilter command.

It is in that file (qfilters.sh above) that I put the path of where I have
the bogofilter binaries.

HOME="/usr/local/bin"
export HOME

I didn't make a 'home' directory for bogo like a user, I just put installed
it in /usr/local/bin.

After I put those two lines in, the problem went away.  I didn't have to do
that before with 0.8.0.

Jim


> I just tried to reproduce the problem, but could not.
>
> I created a new user with /bin/sh default shell, logged in, HOME is set:
>
> $ env
> SSH_CLIENT=192.168.0.1 33747 22
> USER=blah
> MAIL=/var/mail/blah
> HOME=/home/blah
> SSH_TTY=/dev/ttyp1
> LOGNAME=blah
> BLOCKSIZE=K
> TERM=xterm
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr
> /local/bin:/usr/X11R6/bin:/home/blah/bin
> SSH_AUTH_SOCK=/tmp/ssh-nwS6vRlJ/agent.7461
> SHELL=/bin/sh
> FTP_PASSIVE_MODE=YES
>
> I changed the shell to /bin/csh:
> %env
> USER=blah
> LOGNAME=blah
> HOME=/home/blah
> MAIL=/var/mail/blah
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr
> /local/bin:/usr/X11R6/bin:/home/blah/bin
> TERM=xterm
> BLOCKSIZE=K
> FTP_PASSIVE_MODE=YES
> SHELL=/bin/csh
> SSH_CLIENT=192.168.0.1 33748 22
> SSH_TTY=/dev/ttyp1
> SSH_AUTH_SOCK=/tmp/ssh-6qScnB59/agent.7471
> HOSTTYPE=FreeBSD
> VENDOR=intel
> OSTYPE=FreeBSD
> MACHTYPE=i386
> SHLVL=1
> PWD=/home/blah
> GROUP=blah
> HOST=libertas.emma.line.org
> REMOTEHOST=merlin
>
> In either case, HOME is properly defined.
>
> Which shell are you using and how are you invoking bogofilter?
>
> --
> Matthias Andree





More information about the Bogofilter mailing list