Daniel Johansson wrote: > Hello, I've just installed postfix (virtual users) + amavisd (postfix > + clamav) on FreeBSD 6.1. Everything seems to be working fine but I'm > a little confused how to run sa-learn to train spamassassin. fix you clock:) run ntpdate then run ntpd. > > First of do I have to configure anything to tell amavisd-new/SA to use > bayes? > you have to configure SA. in local.cf (or elsewhere): use_bayes 1
you can also enable auto-learn: bayes_auto_learn 1 since you'll use a site-wide database, you can tell SA to use a single db. bayes_sql_override_username vscan (or whatever user amavisd runs as). Using mysql is recommended for performances: bayes_store_module Mail::SpamAssassin::BayesStore::SQL bayes_sql_dsn DBI:mysql:spamassassin:127.0.0.1:3306 bayes_sql_username spamassassin bayes_sql_password xxxxxx to create the db, use the scripts from SA distribution. > Next what's the correct way to run sa-learn so that amavisd-new will > use the database? What I've found is: > su vscan -c "sa-learn --showdots --sync --spam > /var/mail/vmail/donnex/.Spam/cur/" > Is this correct? if you have a lot of mail there, it is better to use --nosync. then run sa-learn --sync afterward. if you use the override_username above, you don't need to 'su vscan'. > > /var/amavis/.spamassassin/ seems to be the workdir for spamassassin > when ran through amavisd-new. I've tried this but I can't see any > mention about bayes in the spam-headers in the mails so I don't know > if it's working or not, any way to check? you can run spamassassin -D -t on a message and see what it says. be aware that bayes only starts doing its jobs if you have trained 200 hams and 200 spams. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ AMaViS-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
