Diffenderfer, Randy writes:
> Looking for "conventional wisdom" on handling the bayes db in a centralized
> production environment.  I don't intend to do autolearning, but instead to
> feed a "carefully selected" set of messages into a central SA instance,
> creating the db via "sa-learn".  I then want to take that database and
> distribute it out to N production relay machines.  I'm looking for any
> gotchas for the act of switching dbs "on the fly".
> 
> Can I just simply play a shell game with the old and new, as in rename the
> current to old and the new to current?  Am I looking at having to restart
> spamd to do this?  Does spamd maintain a handle on the db and pass it to its
> children?

Interesting!  You should be able to copy out the db, no problem -- it's
entirely contained in the "bayes_*" files.  Some gotchas:

1. if there's a .lock file, it's being written to.  Best to shut down
spamd and not run spamassassin while copying out the file from the master.

2. byte-ordering may be an issue (not sure about this by now though,
may be fixed).

3. version of libdb installed is *definitely* an issue, libdb is sensitive
to version changes.  Make sure the master and children match up.

4. you don't need to restart spamd.  Just copy in the new files under
new names and do the std

        mv newbayes_toks bayes_toks
        mv newbayes_seen bayes_seen

trick to move them in quickly.   Don't extract them slowly over the
existing files, however, as that'll probably be an invalid DB_File
format resulting in a couple of messages getting no bayes scores and
some warning messages in the logs.  (unless there's bugs in DB_File
though)

bayes_toks is the one that's really important; it contains all the nspam,
nham, and tokens.  bayes_seen just lists what messages-ids have been
learned from -- if you're not learning on the kid machines you probably
don't even need to bring that over.

--j.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to