[patch] bogoutil maintenance mode [was: ... -m STILL not removing "singletons"]

David Relson relson at osagesoftware.com
Tue Sep 9 20:46:48 CEST 2003


Benji & Chris,

Attached is a patch that fixes bogoutil, AFAICT.  I developed in on
0.15.2, but it should work equally well for 0.14.5.4.  If you're using a
different version of bogofilter, it's time to update :-)

I tested with script "tst.maint", which expects to be run from your
bogofilter/src directory.  The script is:

#!/bin/sh

export BOGOFILTER_DIR=`pwd`
rm -f $BOGOFILTER_DIR/wordlist.db
bogofilter -v -l -s < tests/bogofilter/inputs/spam.mbx 
bogofilter -v -l -n < tests/bogofilter/inputs/good.mbx

echo -n initial count is 
bogoutil -d wordlist.db | wc -l
for cnt in 0 1 2 3 ; do
    echo -n Maintenance:  count - $cnt "-> "
    bogoutil -c $cnt -m $BOGOFILTER_DIR/wordlist.db
    bogoutil -d $BOGOFILTER_DIR/wordlist.db | wc -l
done

Which gives the following output:

[relson at osage src]$ ./tst.maint
# 1744 words, 21 messages
# 4032 words, 48 messages
initial count is   5256
Maintenance: count - 0 ->    5256
Maintenance: count - 1 ->    1813
Maintenance: count - 2 ->     916
Maintenance: count - 3 ->     595

Please give the patch a test and let me know what happens.

David




More information about the Bogofilter mailing list