Is this bogofilter or procmail?

David Relson relson at osagesoftware.com
Fri Jan 3 21:25:51 CET 2003


At 03:12 PM 1/3/03, Parker Morse wrote:

>Again, thanks everyone for helping me get bogofilter running.
>
>I have an interesting puzzle, now that it's trained and going.
>
>I'm invoking bogofilter from procmail using the following recipe, adapted 
>from the bogofilter man page:
>
>:0fw
>| bogofilter -f -u -p
>
>Now, this handles actual spam properly (it gets tagged) but for ham, I 
>find this in the procmail log:
>
>procmail: Program failure (1) of "bogofilter"
>procmail: Rescue of unfiltered data succeeded
>
>These are the first two lines of every non-spam entry in the log. Non-spam 
>messages do NOT get an X-Bogosity header.

Parker,

Add the "-e" switch (meaning nonspam_exits_zero).  Procmail has a 
conditional construct which checks return codes.  bogofilter returns 0 for 
spam and 1 for ham so that this construct can be used.  However, outside 
the conditional construct, procmail considers 0 to indicate "O.K." and 1 to 
indicate "failure".   I leave it as an exercise for the reader to explain 
what's happening :-)

If you still want my recipe, let me know.  It's also in the mime cvs branch 
under the name contrib/procmailrc.example.

David





More information about the Bogofilter mailing list