Hello all... I've spent the past 2 days trying, utterly unsuccessfully, to get spamd to run against a MySQL database. My head is bloody from banging it on the wall, and now I prostrate myself to the mailing list gods in the hopes that you may be able to help me :)
I'm running SpamAssassin 3.2.3 (from Mandriva 2008.0), MySQL 5.0.45, perl-DBD-mysql-4.005, libdbi-drivers-dbd-mysql-0.8.2. I have enabled networking in /etc/my.cnf and restarted mysql. I can connect to the SpamAssassin database as the spamassassin user, both via socket and by specifying localhost or 127.0.0.1 on the command line (e.g.: mysql -u spamassassin -p -h 127.0.0.1 spamassassin). I have populated my /etc/mail/spamassassin/local.cf thusly: user_scores_dsn DBI:mysql:spamassassin:localhost user_scores_sql_username spamassassin user_scores_sql_password PASSWORD #user_scores_sql_custom_query select preference, value from userpref where username= _USERNAME_ or username = '$GLOBAL' or username = CONCAT('%',_DOMAIN_) order by ASC # bayes_store_module Mail::SpamAssassin::BayesStore::MySQL bayes_sql_dsn DBI:mysql:spamassassin:localhost bayes_sql_username spamassassin bayes_sql_password PASSWORD For the user_scores_dsn line, I have tried the above, plus DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock I have run spamd with every combination of flags I can think of (the current is "spamd -d -x -q -c -m5"). I've tried -Q, I've tried dropping the -c, I've tried in Debug mode, etc. etc. ad nauseum. No matter what iteration of spamd or spamassassin I do, I NEVER see a connection to the database, and my preferences as set in the database are never read (as evidenced by my prefids, I've inserted, deleted, etc. my preferences a whole crapload of times as well). mysql> select * from userpref; +----------+---------------+-------+--------+ | username | preference | value | prefid | +----------+---------------+-------+--------+ | $GLOBAL | use_bayes | 1 | 45 | | $GLOBAL | required_hits | 3.50 | 46 | | $GLOBAL | use_razor2 | 1 | 47 | | $GLOBAL | use_pyzor | 1 | 48 | | $GLOBAL | use_dcc | 1 | 49 | +----------+---------------+-------+--------+ 5 rows in set (0.02 sec) I've run "echo yum | spamassassin -D 2>&1 | grep -i sql" with every change I try and it always comes up empty. I have to assume that I've missed a dependency somewhere, or that I've munged my config in some way... Finally, before you jump on my choice of Mandriva as the problem, I've tried all the above on a fresh installation of Fedora Core 7, and it refuses to work in *exactly* the same manner. WTF am I doing wrong?! I know there's something stoopid that I'm missing, and it's extra frustrating because I've gotten this to work many many times. My reference installations are all working as well, and I can find NOTHING different between what's worked in the past (and is still working today) and what I'm doing right now, other than updated versions of everything (MySQL, Perl, SA, etc.). I would be very appreciative of any input that y'all care to share :) Thank you in advance, Rubin -- Rubin Bennett rbTechnologies [EMAIL PROTECTED] http://thatitguy.com (802)223-4448 "Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." -Ben Franklin, Historical Review of Pennsylvania, 1759