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

Greg Louis glouis at dynamicro.on.ca
Thu Jan 30 22:32:40 CET 2003


On 20030130 (Thu) at 1140:22 -0800, Chris Wilkes wrote:
> 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.

Unless you go -p -e, in which case it returns 0 for nonspam.

(I've got mine patched to return 0 for spam, 1 for nonspam, 2 for
uncertain, 3 for errors ;-)

It's worth noting that the 0-for-spam thing is convenient if you use
procmail, so at least some of us are happy.

-- 
| G r e g  L o u i s          | gpg public key:      |
|   http://www.bgl.nu/~glouis |   finger greg at bgl.nu |
| Help free our mailboxes. Include                   |
|        http://wecanstopspam.org in your signature. |




More information about the Bogofilter mailing list