Steven Stern wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Gary V wrote: >>> I'm running amavisd-new with spamassassin and setup bayes and mysql >>> earlier >>> today. It seems to connect to the db fine with user vscan when running >>> spamassassin -d. I ran sa-learn --spam/ham < spam.txt (full email >>> headers >>> too) a few times and those are the only entires in the db, the ones >>> that I >>> added, all other email is untouched. What's the deal? Here is my >>> local.cf >>> file... awl seems to work fine, but it scores mail funky sometimes. >>> >>> # Enable the Bayes system >>> use_bayes 1 >>> bayes_store_module Mail::SpamAssassin::BayesStore::SQL >>> bayes_sql_dsn DBI:mysql:bayes >>> bayes_sql_username vscan >>> bayes_sql_password vscan >>> bayes_sql_override_username vscan >>> >>> # Enable awl >>> auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList >>> user_awl_dsn DBI:mysql:bayes >>> user_awl_sql_username vscan >>> user_awl_sql_password vscan >>> >>> -- >> >> You probably ran the commands as root, so you are only looking at root's >> data. Add this in local.cf: >> >> bayes_sql_override_username vscan >> >> That way everyone will see the same data (site wide configuration). You >> want to always run spamassassin and sa-learn commands as the vscan user >> but adding this seting means that even if you learn spam or ham as root, >> vscan's data will be updated. >> >> su vscan -c 'sa-learn --spam < spam.txt' >> >> Gary V > > > As for the funky AWL values, you need to do some AWL expiry. > > Add a field to the AWL table that shows the last time that address got > hit: > ALTER TABLE awl ADD lastupdate timestamp(14) NOT NULL; > UPDATE awl SET lastupdate = NOW( ) WHERE lastupdate < 1; > > Then set up a script to clean up awl entries: > > /usr/bin/mysql -usa_user -psa_user_psw < /usr/local/bin/trim-awl.sql > > USE sa_bayes; > DELETE FROM awl WHERE lastupdate <= DATE_SUB(SYSDATE(), INTERVAL 2 > MONTH); > DELETE FROM awl WHERE count = 1 AND lastupdate <= DATE_SUB(SYSDATE(), > INTERVAL 15 DAY); > > (reference: http://www200.pair.com/mecham/spam/fc4-spamassassin-sql.html) > - -- > > Steve > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD4DBQFGbBlSeERILVgMyvARAuQ4AJjmzxS8+XmQwclH1/2alQlx+slUAJ9m/EpM > M+0aSAR00llWR5ROGdp/kw== > =H68i > -----END PGP SIGNATURE----- > >
I see, I will take a look. I figured spamassassin did all the work for me, guess not. -- View this message in context: http://www.nabble.com/mySQL-bayes-not-working-correctly-tf3896467.html#a11049848 Sent from the SpamAssassin - Users mailing list archive at Nabble.com.