Keeping various bogofilter databases in sync.

David Relson relson at osagesoftware.com
Fri Feb 18 23:03:01 CET 2005


On Fri, 18 Feb 2005 15:20:55 +0100
Lars Bungum wrote:

> Hiyas!
> 
> I have found out that one bogofilter database maintained at one server 
> performs well also on other servers, with completely different mail.  
> Therefore I would like to synchronize the "main" database with various 
> others in a safe way.
> 
> How  can I best do this?  If I just rsync the database file, can this go 
> wrong somehow?  I mean  given that all versions are the same. 
> 
> --lars

Hello Lars,

I'm not surprised to hear that 1 server's wordlist does a good job on
your other servers.  Time spent working with spam has shown some common
elements and time working with bogofilter shows it's good at classifying
messages based on that kind of informatin.

For copying wordlists and minimizing the likelihood of problems, I'd
suggest using bf_copy to duplicate the database environment, then rsync
to copy it to the new machine, then mv to get the new directory in the
right place.  The process would be (roughly):

  on original machine:  
    1 - bf_copy bogofilter_dir bogofilter_copy_dir
  on destination machine:  
    2 - rsync orig_machine:bogofilter_copy_dir bogofilter_copy  
    3 - mv bogofilter_dir bogofilter_dir_save
    4 - mv bogofilter_copy bogofilter_dir

Alternately, you could use "bogoutil -d" to dump the main wordlist and
"bogoutil -l" to create a new wordlist and "mv" to get the directories
the way you want them. 

Either of these should work (with appropriate names, switches, etc).  I
use variations of these methods to copy my server's wordlist to my
workstation for backup and testing purposes.

HTH,

David



More information about the Bogofilter mailing list