bogofilter's exit codes

David Relson relson at osagesoftware.com
Thu Jul 24 15:51:54 CEST 2003


At 09:36 AM 7/24/03, Gyepi SAM wrote:
>On Thu, Jul 24, 2003 at 08:57:02AM -0400, David Relson wrote:
> > It has been suggested that the exit codes should be:
> >
> > 0 - for spam
> > 1 - for ham
> > 2 - for unsure
> > 3 - for error
> >
> > All in favor say "Yeah".
> > All opposed say "Nay".
>
>Yeah, with the following suggestions:
>
>1. We use an enum for exit codes so next time it's easier.
>
>2. This behavior be controlled with the -E option (note that this is a new
>    option and is supposed to relate to the -e option)
>    without -e or -E: exit codes are: 0,1,3
>    with -e: 0,3
>    with -E: 0,1,2,3

Gyepi,

We're thinking along similar lines:

1. Definitely _not_ numeric constants.  I was thinking of #defines with the 
values below, but using an enum is a minor change.

EX_SPAM   0
EX_HAM    1
EX_UNSURE 2

EX_OK     0
EX_ERROR  3

2. Unsure only happens when bogofilter is in tristate mode (set by 
ham_cutoff non-zero and '-2' not used).  There's no need for '-E', AFAICT.

David





More information about the bogofilter-dev mailing list