upgrading from bogofilter version 0.15.7 -- RECIPE

Chris Fortune cfortune at telus.net
Tue Feb 8 07:59:30 CET 2005


Successful upgrading from bogofilter version 0.15.7 to the current stable version 0.92.8, on RedHat Linux 9.   Time elapsed, 35
minutes.  WOW!  What a difference a year makes.  Very fast, light and clean.   I am seeing excellent classification results as
well - 100% for spams, 0% for spams.


# 7/Feb/2005 22:05
# Upgrade from Bogofilter 0.15.7 to 0.92.8
# Notes, procedures, and commands
# Hope this is of help to somebody.

# I had looked into it and decided not to do an inplace update.
# Instead I will dump the wordlist.db out , uninstall bf and then
# install it anew.  That's a good, safe approach!


# In any case, start with a backup!  Using "bogoutil -d" will dump your
# wordlist as a text file, which is a safe way for it to be.  You
# can verify that the text file is good, i.e. has both the beginning and
# end of the alphabet.

# stop all daemons, cron tasks, etc. that use Bogofilter
crontab -e
top

cd /path/to/.bogofilter
bogoutil -d wordlist.db > wordlist.txt.backup
head wordlist.txt.backup
tail wordlist.txt.backup


# In some cases, there are issues with the way Berkeley DB is
# built for RedHat and that causes problems for bogofilter.
# When you upgrade, you can go to either 0.92.8 or 0.93.4.  Both are good
# and solid.  The main difference is that 0.93.4 uses BerkeleyDB
# transactions to allow multiple readers and writers of the database and
# to protect against database corruption should bogofilter (or your
# machine) crash in the middle of an update.  A cautious approach would be
# upgrade in 2 step - to 0.92.8, then to 0.93.4.  Even more cautious is to
# upgrade in 1 step - to 0.92.8, then stop and count your blessings!


# upgrading to latest stable version.
# get v0.92.8 source
cd /path/to/bogofilter.src
wget http://internap.dl.sourceforge.net/sourceforge/bogofilter/bogofilter-0.92.8.tar.gz
gunzip bogofilter-0.92.8.tar.gz
tar -xvf bogofilter-0.92.8.tar
rm -f bogofilter-0.92.8.tar
cd /path/to/bogofilter.src/bogofilter-0.92.8
less RELEASE.NOTES


# !!!!!!!!!!!!!!!  STOP  !!!!!!!!!!!!!!!!!!!!
# !!    READ! the RELEASE.NOTES* files     !!
# !! Make changes to your config and any   !!
# !! scripts that interact with Bogofilter !!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


# test the new version and deal with failed dependancies
# fix if necessary and repeat until it configures cleanly
cd /path/to/bogofilter.src/bogofilter-0.92.8
./configure
make check


# uninstall old version
cd /path/to/bogofilter.src/bogofilter-0.15.7
./configure
make && make uninstall && make clean


# install the new version
cd /path/to/bogofilter.src/bogofilter-0.92.8
make && make install && make clean


# load the wordlist
cd /path/to/.bogofilter
bogoutil -l wordlist.db < wordlist.txt.backup


# TEST !
bogoutil -d wordlist.db |less
# more tests
...


# restart crontabs, daemons, etc...
crontab -e



# After installing and loading the wordlist and testing, you'll probably want to run
# "bogoutil --db-prune" to clean out unneeded log files.

bogoutil --db-prune

                    # Cannot get this to work ???
                    #Unknown option --.
                    #Can't open file 'b-prune'









More information about the Bogofilter mailing list