wiki:SpamAssassin3SQLBayes

Version 1 (modified by maia@…, 13 years ago) (diff)

New page

Setting up bayes with SpamAssassin 3.x, using a MySQL database

(Copy and pasted from the mailing list)

You can find the database definitions for AWL and bayes here: http://spamassassin.apache.org/full/3.0.x/dist/sql/ (or as part of your 3.0 package).

I added the defs in awl_mysql.sql and bayes_mysql.sql to my maia database.

Then, in user_prefs for amavis (mine's in /var/amavis/.spamassassin/), I added the following lines:

#--userprefs--
use_bayes 1
bayes_store_module                Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn                     DBI:mysql:maia
bayes_sql_username                maia
bayes_sql_password                YourMaiaPass
auto_whitelist_factory            Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn                      DBI:mysql:maia
user_awl_sql_username             maia
user_awl_sql_password             YourMaiaPass
#--end userprefs---

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.