exit codes in docs

Boris 'pi' Piwinger 3.14 at logic.univie.ac.at
Tue Aug 5 09:17:52 CEST 2003


Matthias Andree <matthias.andree at gmx.de> wrote:

>> 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.

So that is my point. Other programs do have exit codes other
than OK and error. So it is reasonable that bogofilter has
the decision in the exit code.

>> > 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.

Still I don't agree, see below.

>> >        :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.

See, things are getting way more complicated.

>> > 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.

??? The above recipe says: If you cannot tell for sure, it
is spam, deliver it. There is no change to that. And it is
safe, this is the best protection possible against mail
loss.


From a different mail:

>> No. If for some reason procmail cannot call bogofilter
>> successfully, play safe and deliver.
>
>I don't consider unchecked mail "safe" for delivery.

Much safer than possible mail loss.

>>>We encourage a use of
>>>procmail that can do anything it wants to, depending on weather and
>>>things. The safe thing with "bogofilter error" is to defer rather than
>>>deliver, 
>>
>> For how long before the mail bounces (like on vacation)?
>
>Site-specific. 

See, that is a risk. If this is important mail which does
not get delivered, you pay a very high price. If bogofilter
gets broken (say by damage to the database) you suddenly get
no mail at all.

>If yo leave your system running for three weeks, then you
>have to deal with the implications. 

Right, i.e., keep the risk low.

>If some idiot sends you some dozen 8
>MB mails and runs your favourite system partition out of space, there's
>nothing for you to win before some can clear up that condition.

Wrong. My procmail files huge mails away.

pi




More information about the Bogofilter mailing list