Bogofilter Behaviour on encountering error is unacceptable.

Matthias Andree matthias.andree at gmx.de
Tue Feb 20 23:50:57 CET 2007


K T Ligesh schrieb:
> On Tue, Feb 20, 2007 at 10:38:37PM +0100, Matthias Andree wrote:
>> K T Ligesh schrieb:
>>> Hi folks,
>>>
>>>  It seems that when bogofilter encounters some problems like the lack of the wordlist file, it just truncates the mail completely and sends only a couple of headers across. This is dangerous since if you have a large number of users, it is likely that there will be times when the wordlist files are missing. The behaviour that I am expecting is that it should just pass the entire message without doing anything on it.
>>>
>>>  At least, according to me, the current behaviour makes bogofilter actually unusable since there is a very high chance of mails completely getting lost. Is there some configuration option that will tell bogofilter to return the entire message unaltered when it encounters an error?
>> Then integrate bogofilter properly with the rest of your system.
>> In such situations, bogofilter will exit with error code 3 which you can
>> test for and handle accordingly, such as push the message back to the
>> mailserver's queue or retrieve the unfiltered message or do things like
>> that. This is not a bogofilter bug.
> 
>  I want the default behaviour to be sane. Are you saying that what I have described is indeed how bogofilter behaves on encountering an error? Even with complex script solutions like 'returning the mail back to the queue', things can go wrong, and we are unnecessarily bringing in complications.

The default behavior is about as sane as it can get: describe what the
user needs to do to fix the situation, and exit with an error code.

There is no such thing as a default integration scheme, it's all up to
the user what he or she makes of the exit code, and write scripts to
deal with such conditions.

We're not going to play double paranoid, because that game has no end.

>  Spam check is not an essential service. Of course, it is an absolute must considering the amount of spam, but when we have to choose between lot of spam getting through and mails getting completely munged by the spam filter, I think the choice is obvious. The default behaviour should be let the mail through unaltered when it encounters an error and report the situation on stderr.

The default behavior is to consume, process and discard standard input
and exit with code 0, 1, 2 or 3 depending on what bogofilter thinks of
the input, without any output... - so if you expect bogofilter to always
emit its input, you've GOT to re-read the manual!

>  Anyway, could you please confirm that this is the actual behaviour, and not some configuration error on my part?

As written in my earlier message, fix your setup. That likely means
configuration error in your terms - but nobody can make a final call on
that without actually seeing what you're doing, as somebody else wrote
so carefully. I'm just poking into the black here...




More information about the Bogofilter mailing list