How to limit log file generation???
Joseph Luk
joespam_bogofilter at choberi.com
Mon Jan 24 02:43:20 CET 2005
I'm having problems with the "autoremove" option. According to
README.db, you use the following line in DB_CONFIG:
set_flags DB_LOG_AUTOREMOVE
However, according to a post on this list from last November, you use
the following line:
set_flags DB_DB_LOG_AUTOREMOVE
(http://www.bogofilter.org/pipermail/bogofilter/2004-November/
006924.html)
Both of these, unfortunately, result in the following error:
bogoutil: DB_ENV->open, err: Invalid argument
Maybe my version of BerkeleyDB isn't recent enough to support this
flag, but without access to the db_* commands I have no way of finding
the version directly. Is there a bogoutil option to show the
BerkeleyDB version?
...
I realize that logs are useful, but for a virtual hosting type account
with a limited disk quota, it makes more sense to just retrain from
mailboxes in the unlikely event of a failure. I'm surprised that
others haven't run into this problem??
> The first question is why lots of logs are created.
I'm using a "honeypot" type approach where specific addresses collect
nothing but spam and continually train the filter. I wonder if adding
sleep(5) (or so) prior to calling bogofilter from procmail would
improve performance? That way, if a spammer sends a bunch of messages
all at once, bogofilter has a chance to update its database on honeypot
mail before filtering real mail. Anyway, I digress.
Thank you so much for your help, David and others!
Cheers,
Joe
On Jan 23, 2005, at 5:31 AM, David Relson wrote:
>> How do you prevent bogofilter / BerkeleyDB from generating log.* files
>> until it eats up your entire disk quota??
>
> Berkeley DB uses the log files to ensure database coherency in the
> event
> of software or hardware failure while writing to the database. Hence
> they're valuable.
>
> The first question is why lots of logs are created. My bet is that
> you're using '-u', which causes a lot of database activity. A
> complementary config option "thresh_update" which sets an auto-update
> threshold, i.e. tells bogofilter _not_ to update with easy ham and
> spam.
> For example, my server has "thresh_update=0.01" so that ham scoring
> 0.01
> or less and spam scoring 0.99 (or above) does not go into the wordlist.
>
> An alternate approach is outlined in doc/README.db. Look for the
> "AUTOREMOVE" option of the DB_CONFIG file. It should cure your
> problem!
More information about the Bogofilter
mailing list