bogofilter randomly fails to find db's
Roger 'Rocky' Vetterberg
listsub at 401.cx
Fri Jan 9 18:47:58 CET 2004
Hi list.
I recently installed bogofilter on a FreeBSD 4.9/Sendmail 8.12.9p2
server. Im using a series of procmail rules and shellscripts to feed
spam into bogofilter to train it.
Every 30 minutes, a shellscript checks a certain imap folder for new
messages, and if it finds any, it feeds it to bogofilter with the
following command: /usr/local/bin/bogofilter -s < $basedir/$junk
The folder contains between 0 and 20-25 messages each time, depending
on the amount of spam recieved in the last 30 minutes.
Usually, it works like a charm, but on what seems like random
occations it fails with the following error:
Can't open files 'spamlist.db' and 'goodlist.db' in directory
'/var/lib/bogofilter',
error #2 - No such file or directory.
Remember to register some spam and ham messages before you
use bogofilter to evaluate mail for its probable spam status!
Learned from 1 message(s) (1 message(s) examined).
The command mentioned above is executed every 30 minutes 24 hours a
day (provided there is spam in the folder), and it fails on average
maybe 3 times each day. Sometimes it may fail two times in a row, but
more often the failures are spread evenly across the day.
Of course, I have checked that the directory does indeed exist, all
permissions are set correctly and the db is writeable. Running the
command manually never produces these errors, it has so far only
happened when executed from crontab.
I have even modified the script so that it checks that the directory
and both db's really exists before running the bogofilter command, and
sofar this check has never failed, but still bogofilter complains not
even a second later that they dont exist.
The only idea Ive had is that perhaps the previous process may still
be running and therefor somehow puts a lock on the db, but when
timeing the process I have never seen it running for more then 2
minutes, so the process started 30 minutes ago shold have finished
long before the next run is invoked.
Im simply stumped by this and totally out of ideas. Does anyone have
any idea what might cause this?
Please cc any replies to me since Im not subscribed to the list.
--
R
More information about the Bogofilter
mailing list