Changing bogofilter output sense

Greg Louis glouis at dynamicro.on.ca
Fri Jul 11 00:30:33 CEST 2003


On 20030710 (Thu) at 1455:45 -0700, Rick Mann wrote:

> Unfortunately, bogofilter returns a 0 for spam, and 1 for good mail. I would
> like to invert the sense of bogofilter's output, so that it returns a 1 for
> spam and 0 for good mail.
> 
> I would prefer the primary check to be bogofilter, but to do that I need to
> reverse the output values. I suppose I could patch my own copy, but it'd be
> nice if there was a command line option to do this.

The -e option, unfortunately, forces bogofilter to exit with 0 unless
there is a processing error.  The patch to create a command-line option
of the sort you need, however, wouldn't be too difficult (I think you
need to look at src/bogoconfig.c, src/rstats.c and src/main.c).  If you
implement it, it's probably worth sending it along to David for
consideration.

-- 
| G r e g  L o u i s          | gpg public key: finger     |
|   http://www.bgl.nu/~glouis |   glouis at consultronics.com |
| http://wecanstopspam.org in signatures fights junk email |




More information about the Bogofilter mailing list