Serious Problem - db log file owner

Matthias Andree matthias.andree at gmx.de
Mon May 23 12:48:57 CEST 2005


Petr Danecek <danecek at ucl.cas.cz> writes:

> first of all, let me thank you for the wonderful software which saves me
> lots of time and sorts out hundreds of spam emails a day!

Thank you.

> it mostly works very well, but once a month or so, the berkley db
> creates a new log file in the ~/.bogofilter directory which is owned by
> root and not by the user. as a consequence, i get in the mailbox only
> empty files!! i can only guess if they were only spams or some important
> documents.

So

1. run bogofilter trainings under the right user's account (check the
   su(1) command), or put all bogofilter enabled users into a common
   root and run bogofilter with umask 02 (this requires a somewhat
   recent bogofilter versions, older would not leave the group write
   permission bit enabled).

2. make sure your system detects bogofilter errors and properly defers
   the mail - defer the mail if bogofilter exits with code 3 (used to be
   2 for ancient versions that did not support "unsure" classification)

> also, i believe that bogofilter should change its behaviour - if the
> underlying database fails, it should not exit cowardly, but should
> stream the message instead. 

It can't. There's always a case when bogofilter cannot make progress and
exits with a signal or error code. Whenever bogofilter does not exit
with status 0, 1 or 2, but exits with any other status code, or with a
signal, you must push the message back to the queue. In many cases, this
means you "exit 75" from your integration script. See the documentation
of your MTA for details.

Hence the exit without output isn't cowardly, but because it cannot make
progress. Continuing without filtering would make the whole process
nondeterministic, i. e. irritating, annoying to debug, and unreliable.

Besides, question like these belong on the bogofilter@ list.
I'm redirecting replies there.

-- 
Matthias Andree



More information about the Bogofilter mailing list