exit codes in docs

Matthias Andree matthias.andree at gmx.de
Mon Aug 4 18:41:18 CEST 2003


[resend to the list]

Boris 'pi' Piwinger schrieb am 2003-08-04:

> Hm, can't you use exit codes of grep to see if some
> expression did match?

Of course you can. The exit codes for grep are prescribed by IEEE
Std 1003.1-2001. This doesn't apply to bogofilter which changes exit
codes...

However, you'll have to tell "no match" (1) from "error" (>1) with grep
as well, so it doesn't improve your situation.

> > My suggestion is remove the "exit code" interface and just use an
> > interface along the lines that bogofilter -tv or bogofilter -p provide.
> 
> Now that would break interfaces of most people. And it would
> make using it much harder, like in the procmail case.

The procmail case you refer to is broken.

> >        :0fw
> >        | bogofilter -u -e -p
> 
> I don't like that example because of -p. What if you don't
> want it?

You store the result of bogofilter -vt in a variable and check that
variable. procmail has backtick and VAR=|command operators.

I don't really use procmail, so please dig through procmailrc yourself.

> > We need to tell people to expect extensions and handle
> > them by pushing "non-understood" codes back to the mail queue.
> 
> Or file them as needed.

Nope. We can't tell the user in advance what extension we plan, because
if we could, we could instead implement and document them. This is to
support unforeseen extensions.

-- 
Matthias Andree




More information about the Bogofilter mailing list