Bogofilter Behaviour on encountering error is unacceptable.

Matthias Andree matthias.andree at gmx.de
Tue Feb 20 22:52:47 CET 2007


Following up on myself with a bit more detail, the filtering is robust
WRT missing wordlists, as you can see in this test, so no reason to
panic or make a fuss about alleged bogofilter misbehavior:

$ cat /tmp/procmailrc
DEFAULT=/tmp/mbox
:0fw
| bogofilter -e -p -d /tmp
# if bogofilter failed, return the mail to the queue;
# the MTA will retry to deliver it later
# 75 is the value for EX_TEMPFAIL in /usr/include/sysexits.h
:0e
{ EXITCODE=75 HOST }

$ LANG=C ls -l /tmp/wordlist.db
ls: cannot access /tmp/wordlist.db: No such file or directory

$ echo "header: test

body" | procmail /tmp/procmailrc VERBOSE=yes LOGFILE=/dev/stderr;echo "### exit status: $? ###"
procmail: [10460] Tue Feb 20 22:49:14 2007
procmail: Assigning "LOGFILE=/dev/stderr"
procmail: Opening "/dev/stderr"
procmail: Rcfile: "/tmp/procmailrc"
procmail: Assigning "MAILDIR=/home/emma"
procmail: Assigning "DEFAULT=/tmp/mbox"
procmail: Executing "bogofilter,-e,-p,-d,/tmp"
bogofilter[10462]: cannot compile SELECT value FROM bogofilter WHERE key=? LIMIT 1;: no such table: bogofilter_

Remember to register some spam and ham messages before you
use bogofilter to evaluate mail for its probable spam status!

procmail: Program failure (3) of "bogofilter"
procmail: Rescue of unfiltered data succeeded
procmail: Assigning "EXITCODE=75"
procmail: Assigning "HOST"
procmail: HOST mismatched "merlin"
  Folder:                                                                     0
### exit status: 75 ###





More information about the Bogofilter mailing list