<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff size=2>I
recently migrated a bayes db to a new server. The following worked for
me:</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2>1) Install the same version of SpamAssassin on both machines. You
also want to make sure the DB_FIle perl module is at (or near) the same version
number, as well as any associated DB3 packages. I migrated from RH 7.2 to RHEL
ES 2.1, so my perl installations and other packages were almost
identical.</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2>2) Shutdown the MailScanner service and rebuild the bayes db on the
old machine.</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff size=2>I used
the following command: sa-learn -D -p /etc/MailScanner/spam.assassin.prefs.conf
--rebuild</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff size=2>3)
Copy the bayes db to the same location on the new machine (make sure the
permissions match). I store bayes in /var/spool/spamassassin/bayes and
indicated this in spam.assassin.prefs.conf.</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff size=2>4)
Start the MailScanner services and check the logs for BAYES scores. You
can also run the above sa-learn command again (with the -D switch) to check for
any possible errors.</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff size=2>That's
it!</FONT></SPAN></DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=354535404-16122003><FONT face=Arial color=#0000ff
size=2>Nathan</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Bart J. Smit
[mailto:mailscanner@SMITS.CO.UK] <BR><B>Sent:</B> Monday, December 15, 2003
4:45 PM<BR><B>To:</B> MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Migrate
bayes database to new machine<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I have built a new MS machine to relieve the
strain on the humble hardware of the old relay. </FONT><FONT face=Arial
size=2>Prior to cutting over, I would like to migrate the bayes database to
give the new box a running start. I tried these commands:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>on the old box: sa-learn --dump all >
/tmp/badump</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>copy this file to the new box and do: sa-learn
--import /tmp/badump</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This comes back with: </FONT><FONT face=Arial
size=2># bayes upgrade_old_dbm_files: unable to find bayes_toks and
bayes_seen, stopping</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have tried with pointing both sa-learn commands
to their respective database paths (/root/.spammassasin/bayes) and preferences
(/etc/MailScanner/spam.assassin.prefs.conf). I have rebuilt the latest
spamassasin (2.61-1) from source RPM and upgraded it on both boxes, but
still I get the error.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm obviously missing something
simple.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any clues?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Bart...</FONT></DIV></BLOCKQUOTE></BODY></HTML>