bogofilter -u let's spam come through
David Relson
relson at osagesoftware.com
Fri Feb 20 23:53:15 CET 2004
On Fri, 20 Feb 2004 16:37:12 -0500
Eric Wood wrote:
> David Relson wrote:
> > Assuming that, I ran a test to verify that the return codes from
> > "bogofilter" and "bogofilter -u" are the same. I got the same
> > answers using both commands.
> >
> > Are you checking return codes properly? Remember they're
> > 0 - spam
> > 1 - ham
> > 2 - unsure
>
>
>
> It must be an exit code problem. Here is the last thing in my
> procmail::0fw
> * < 20000
> | bogofilter -p -e
>
> :0 HB
> * < 20000
> * !^From:.*spambox at intgrp\.com
> * !^X-Loop:.*spam-trap
> * !^TOspambox at intgrp\.com
> * ? bogofilter
> {
> :0 fwh
> | formail -A"X-Loop: spam-trap bogofilter"
> :0
> ! spambox at intgrp\.com
> }
>
>
> Now, I just received some spam and it had:
> X-Bogosity: Yes, tests=bogofilter, spamicity=1.000000, version=0.15.8
>
> I changed "* ? bogofilter" to be "* ? bogofilter -u" and the spam
> delivered to the user and not to the spambox. Again the head is:
> X-Bogosity: Yes, tests=bogofilter, spamicity=1.000000, version=0.15.8
>
> So bogofilter *is* classifing the message as spam but the "-u" causes"
> bogofilter to exit with code > 0.
>
> -Eric Wood
With the same message, try the following to display the exit code:
bogofilter -v < message
echo $?
bogofilter -v -u < message
echo $?
My tests with 0.17.1 looked fine and I don't think exit codes have
changed in a long, long time.
David
More information about the Bogofilter
mailing list