At 12:44 PM Monday, 9/24/2007, you wrote -=>
On a new server I'm running Debian Etch, Sendmail and SpamAssassin,
hosting email for a few accounts.  I'm contemplating converting my
SpamAssassin to using MySQL.  Is there a "HOWTO" somewhere which
would be good to follow?

To set up the MySQL db:

http://svn.apache.org/repos/asf/spamassassin/branches/3.2/sql/README

and then from http://wiki.apache.org/spamassassin/BetterDocumentation/SqlReadmeBayes?highlight=%28mysql%29

Converting Bayes Data From a DBM Database
-----------------------------------------

Converting your bayes database data from Berkeley (DBM) based storage
to SQL based storage is as simple as a backup and then restore.

If you are upgrading from a previous version of SpamAssassin you
should first follow any recommended upgrade instructions for that
release, in most cases this will be as simple as running an
sa-learn --sync

Once you have performed this upgrade, for each bayes database follow
this procedure:

o Run 'sa-learn --backup > backup.txt' which will backup your bayes
  data into a text file.
o Optionally you can run 'sa-learn --clear' to remove the DBM based
  bayes files.
o Modify your local.cf file according to the directions above.
o Run 'sa-learn --spam <sample spam message>' to initialize the
  database.
o Run 'sa-learn --restore backup.txt' to restore your bayes data to
  the SQL database.

NOTE: sa-learn must be run as the user who's data you are loading, or
      you must make use of the bayes_sql_override_username config
      option.

NOTE: failure to use 'sa-learn --spam <msg>' on an initial spam message
      will result in the error message
      "bayes: unable to initialize database for <username> user, aborting!"

I suggest you read all the docs before proceeding. I did the same upgrade a while back and had no problems...

Ed Kasky
~~~~~~~~~
Randomly Generated Quote (446 of 568):
Our task must be to free ourselves...by widening our circle of
compassion to embrace all living creatures and the whole of nature
and its beauty.  - Albert Einstein

Reply via email to