procmail question
David Relson
relson at osagesoftware.com
Thu Jan 9 13:38:46 CET 2003
At 11:53 PM 1/8/03, Jason S. Friedman wrote:
>If I'm reading your .procmailrc correctly, you expect the command
>bogofilter -p -u -l -e -v
>to return 0 or 1 depending on whether bogofilter believes the message is
>spam.
>
>The "error catcher" lines then say that if bogofilter returns with a
>non-zero exit code then send this message back for later delivery?
Jason,
Close, but not quite.
In normal operation bogofilter exits with 0, 1, or 2. 0 indicates spam, 1
indicates ham, and 2 indicates an error. The 0 and 1 values can be used by
procmails "?" operator.
The "-e" flag means "nonspam exits zero". When using "-e", bogofilter
exits with 0 for both spam and ham. 2 still indicates an error.
So, the "error catcher" lines will be activated when bogofilter
aborts. With "-l" turning on message logging, bogofilter should be logging
an error message whenever it uses exit 2.
I'm not finding any bogofilter error messages in the logs, but I am finding
procmail error messages. Run from the command line, all is well. It's
very puzzling.
To add another data point, 21:03 was the last appearance of the error messages.
>What happens when you run these from the command line:
>bogofilter -p -u -l -e -v < file_containing_mail && echo "exiting zero"
>bogofilter -p -u -l -e -v < file_containing_mail || echo "exiting
>non-zero"
It says "exiting zero".
FWIW, I also ran the following commands:
bogofilter -p -u -l -e -v < file_containing_mail
rc=$?
echo rc is $rc
and they said "rc is 0"
More information about the Bogofilter
mailing list