Spamassassin

From wiki
Revision as of 06:49, 4 March 2016 by Vincent (talk | contribs) (Add Bayes training)


Warning Warning: This page is a work in progress and is not completed. Important informations might be missing or wrong.

edit file /etc/spamassassin/local.cf

bayes_path /var/lib/spamassassin/bayes_db/bayes
bayes_file_mode 0770
# mkdir /var/lib/spamassassin/bayes_db


Training

To reach a good efficiency, SpamAssassin Bayesian filter need to be trained with both spam and ham messages. You can use your actual mailbox for that but note the following points:

  • Be sure that the folders you use for training contain only spam or ham. If a folder contain a mix of them, SpamAssassin will learn wrong info and produce bad quality results
  • To be effective you need between 1000 and 5000 messages each of both spam and ham.
  • You need to have more ham than spam to train. Otherwise, SpamAssassin might become biased toward spam.
# sa-learn --spam --showdots --dir /var/maildir/<username>/Maildir/.Spam/cur/
# sa-learn --ham --showdots --dir /var/maildir/<username>/Maildir/cur/