Bogofilter locks too much

Matthias Andree matthias.andree at gmx.de
Wed Jan 5 00:00:07 CET 2005


On Tue, 04 Jan 2005, Karl O. Pinc wrote:

> >(1) run: bogoutil --remove-environment ~/.bogofilter
> 
> Would that be --db-remove-environment?  (I'll skip this
> choice for fear of doing something to my database, although
> it probably already should be rebuilt as some spam has
> gotten mis-classified due to this error.)

Right, the option got renamed.

It is safe to use because it runs recovery first, which flushes all
pending changes from the logs to the .db file before the environment is
removed.

> >(2) remove the two lines you mentioned above from /etc/bogofilter.cf
> >and
> >    create instead a ~/.bogofilter/DB_CONFIG file with lines like
> >these
> >    (no spaces at the beginning of the lines):
> >
> >    set_lk_max_locks 65000
> >    set_lk_max_objects 65000
> 
> I did this and it worked.  I first tried 16384, but had to up it
> to keep from getting the error message.  (65000 sure seems an
> awful lot of locks.)

for 145 MB and 4,096 byte page size, something above 37000 will suffice.

> FYI, your FAQ entry on DB_CONFIG does not say where the file should go.
> 
> Also, it's not clear what the default config values are.

bogofilter -CQQ will report the defaults in a format that can directly
be used as a configuration file. Currently 16384.

> >You haven't even exhausted 16 bits (0...65535) :-)
> 
> Oops.  All those bits.  Makes my head sore.  ;-)

Nevermind.

> Should I do something (bogoutil --db-remove-environment ~/.bogofilter/  ?)
> to clean up the ~/.bogofilter directory and remove all those
> files or is that normal?

--db-remove-environment gets rid of __db.* and is mainly there to
support Berkeley DB library upgrades, see doc/README.db for the detailed
procedure.

To clean up the log.* files, you'll need to snapshot your database (for
instance by means of the bf_tar script) and if that succeeded and is on
backup media, you can remove the excess log.* files with

    bogoutil --db-prune=~/.bogofilter

> FYI, that big password file email that was choking got incorrectly  
> classified as spam.  This is a little wierd as I've gotten similar  
> mails in the past from the same person and have saved them in my
> ham training set, which I used to train this time.
> 
> I probably should train all over again now that this is fixed..

Or train that particular mail so often until bogofilter -v reports it as
ham. It's cheating and aloof from the pure teachings but to emulate a
white list with marginal side effects it might work.

Thanks for your quick feedback.

-- 
Matthias Andree



More information about the Bogofilter mailing list