Bowie Bailey wrote:
Jay Lee wrote:
Bowie Bailey wrote:
If you have a working config with Courier and MySQL, please share.
:)
Sure, the most relevant parts are:
my /etc/init.d/spamassassin script that starts spamd has:
SPAMDOPTIONS="-d -c -m20 -q -x"
where -d means daemonize the process, -c means create non-existant
prefs for new users (not entirely sure this is necessary for SQL),
-m20 means start max of 20 children (this might be zealous, I believe
I bumped it awhile back when maildrop starting timing out...), -q
means use SQL instead of flat files and -x means don't try to look
for per-user-config in home directories.
In /etc/mail/spamassassin/local.cf I have:
#Use mysql for user prefs
user_scores_dsn DBI:mysql:spamassassin:localhost
user_scores_sql_username spamassassin
user_scores_sql_password password
#Use mysql for bayes autolearning data
bayes_store_module Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn DBI:mysql:spamassassin:localhost
bayes_sql_username spamassassin
bayes_sql_password password
In the global maildroprc I have:
import USER
xfilter "/usr/bin/spamc -u $USER -s 300000"
You may need to install a few perl scripts from CPAN also, follow the
generic SQL info from Spamassassin's docs.
That looks simple enough. What do you have to do when you call
sa-learn?
sa-learn -u $USERNAME
the rest is read from local.cf. Works quite well, forgot to mention
that I'm using the db schema that ships with the SA tarball...
Jay
|