bogofilter's exit codes
David Relson
relson at osagesoftware.com
Sat Jul 26 01:10:41 CEST 2003
At 06:40 PM 7/25/03, Matthias Andree wrote:
...[snip]...
> > I'm thinking of making the change for the next release, i.e. version
> 0.14.1?
> >
> > All in favor say "Yeah".
> > All opposed say "Nay".
>
>Nay. We shouldn't change the meaning of "2", because that's a code
>that dates back to the early versions. We can add new exit codes, or we
>can instead define an extensible yet easily parsed format so that people
>can stuff their mails into bogofilter using shell backticks.
>
>STATE=`bogofilter -O <mail`
>
>or something.
Bogofilter already has '-t' for "terse" mode. The default output format of
"%1.1c %f" produces values like:
N 0.000000
Y 0.999999
U 0.500000
Using bogofilter.cf the format is redefinable as are the spamicity_tags,
i.e. 'Y', 'N', 'U'. There's no need for adding '-O'.
As to changing the error exit from 2, my bet is that people use '-e' and
check for 0 or non-zero, with the rest checking for 0, 1, or "other". None
of these people will be affected by the change from 2 to 3. The addition
of a value for Unsure, is probably not harmful.
... still waiting to hear from someone that will be adversely affected by
the change ...
David
More information about the bogofilter-dev
mailing list