reading and writing wordlists [was: copying wordlists]

David Relson relson at osagesoftware.com
Thu Nov 25 23:21:20 CET 2004


On Thu, 25 Nov 2004 08:08:18 -0800
.rp wrote:

> I am really confused about the subject of updating the wordlists in 
> bogofilter, but I think I just hit a "eureka" moment.
> 
> I am still in .15 version, and when I do a "bogoutil -m" I always make
> sure that sendmail is off. Is the standard procedure that people are
> using to do manipulations of the bogofilter tables while the MTA is
> running???

Hi .rp,

Glad to hear of your Eureka moment!  Versions of bogofilter prior to
0.93 use a simple locking scheme:  Any number of programs, i.e.
bogofilter and bogoutil, can simultaneously read from the wordlist, but
only 1 program can have write access.  So, "bogoutil -m" won't be able
to get write access to the wordlist while another program is reading it.
Once bogoutil _does_ get write access, no other program will be able to
access the wordlist.

The transaction work of 0.93 has two major benefits.  First, it
provides protection against corrupted databases caused by program
crashes, programs being killed, machines crashing, etc.  Second, it
allows multiple programs to access the database since locking is now
done for each page (rather than the whole database).

Anyhow, you _can_ use "bogoutil -m" and I don't think you'll run into
problems.  If you want to be absolutely safe, your 0.15 wordlist(s) can
be copied to a new directory where you can run bogoutil and then use
"mv" to save the old wordlist(s) and put the new wordlist(s) in place.

HTH,

David



More information about the Bogofilter mailing list