[matej at ceplovi.cz: Bug#179079: bogofilter: Make bogofilter compatible on errorcodes with spamassasin.]

Chris Wilkes cwilkes-bf at ladro.com
Thu Jan 30 20:40:22 CET 2003


On Thu, Jan 30, 2003 at 02:03:03PM -0500, Clint Adams wrote:
> ----- Forwarded message from Matej Cepl <matej at ceplovi.cz> -----
> 
> I guess it is obvious, what I mean. When using bogofilter as an
> replacement for spamassasin (because it is faster and it does not need
> a network connection), I would prefer bogofilter to return zero, when
> the message IS NOT spam and non-zero when it is.

The reasoning behind returning zero on SUCCESS and sending back the error
code (there can be several) if it fails is a long established practice.
Since you're testing to see if a message IS spam you want to have it
return a 0 on success.

> In my case, the script I would like to use is isbg (IMAP Spam Be Gone,
> http://www.rogerbinns.com/isbg). Of course, I can patch isbg (which
> I did) or make some script working around the issue, but it would be
> much better if bogofilter would get into line with other programs (it is
> not only spamassasing) and frankly with the logic (it is not OK, when
> the message is spam).

Bogofilter classifies mail as either spam or not spam.  It returns a
value based on its classification, and in this case it is 0 for spam and
1 for non-spam.

Instead of patching BF to get it to return a value that's opposite of
what everyone expects out of it, I would think that its better to make
ISBG work in the way that most program work with return codes as
described above.

Can you negate the return result of your spamchecking program?
Something like "isbg.py --useBF --negate value" or something.

Or you can write a "unbogofilter" that captures bogofilter's results and
returns the opposite.

Chris




More information about the Bogofilter mailing list