Changes between Version 2 and Version 3 of SpamAssassin3SQLBayes


Ignore:
Timestamp:
Oct 6, 2004, 1:27:31 AM (16 years ago)
Author:
maia@…
Comment:

Cleanup/more info (should have done this the first time and will in the future, don't want to flood the RSS) :(

Legend:

Unmodified
Added
Removed
Modified
  • SpamAssassin3SQLBayes

    v2 v3  
    11= Setting up bayes with SpamAssassin 3.x, using a MySQL database =
    22
    3 ''(Copy and pasted from the mailing list)''
     3''Bits taken from the mailing list and [http://www.paulstimesink.com/index.php?op=ViewArticle&articleId=163&blogId=2 Paul Westbrook's experiences].''
    44
    55You can find the database definitions for AWL and bayes here:
     
    77(or as part of your 3.0 package).
    88
    9 I added the defs in awl_mysql.sql and bayes_mysql.sql to my maia database.
    109
    11 Then, in user_prefs for amavis (mine's in /var/amavis/.spamassassin/), I
    12 added the following lines:
     10''If you are using MySQL 4.x, I would advise you to change the tables from type MyISAM to InnoDB to improve the locking speed.''
     11
     12Create the tables required with commands such as the following:
     13 * '''mysql -u root maia -p < awl_mysql.sql'''
     14 * '''mysql -u root maia -p < bayes_mysql.sql'''
     15
     16Backup up the bayesian databases with a command like the following:
     17'''sa-learn --backup > backup.txt'''
     18
     19Next, add the following lines to the file '''~amavis/.spamassassin/user_prefs'''
     20 
    1321{{{
    1422#--userprefs--
     
    2533}}}
    2634
     35Add the bayes database to the newly created SQL tables:  '''sa-learn --restore < backup.txt'''
    2736
    28 If you are using MySQL 4.x, I would advise you to change the tables from type MyISAM to InnoDB to improve the locking speed.
     37Test that SpamAssassin can connect to the bayes SQL database:
     38{{{
     39amavis:$ spamassassin -tD < sample-spam.txt  2>&1  |grep Database
     40debug: bayes: Database connection established
     41}}}
     42
     43If you see output such as the above, restart '''amavisd-new'''.  Your ''Amavisd-Maia / SpamAssassin 3'' installation should now be set-up to use SQL based bayes.  Congrats. :)
     44
    2945
    3046[wiki:FAQ Back to FAQ]