SpamAssassin

From Indie IT Wiki
Jump to: navigation, search

Adjust Rule Scores

nano /etc/mail/spamassassin/local.cf

# score PLING_PLING 1.047 1.325 1.157 0.650
score PLING_PLING 2.1 2.7 2.3 1.3  # Double default scores

https://wiki.apache.org/spamassassin/AdjustRuleScore

Whitelist

https://wiki.apache.org/spamassassin/ManualWhitelist

Test Different Configuration Settings

Everything...

sudo spamassassin -D --lint

Bayesian Classifier...

sudo spamassassin -D bayes --lint

DCC...

sudo spamassassin -D dcc --lint

Pyzor...

sudo spamassassin -D pyzor --lint

Razor2...

sudo spamassassin -D razor2 --lint

Set: Bayes Files

sudo nano /etc/mail/spamassassin/local.cf

or maybe...

sudo nano /etc/spamassassin/mailscanner.cf
     auto_whitelist_path /var/spool/MailScanner/spamassassin/auto-whitelist
     auto_whitelist_file_mode 0664
     bayes_path /var/spool/MailScanner/spamassassin/bayes
     bayes_file_mode 0664
     use_bayes 1

Change Spam And Learn From A Single Message

sudo sa-learn --forget /home/spam/.maildir/new/1395249824.M568465P26233.mail,S=6623,W=6782
sudo sa-learn --ham /home/spam/.maildir/new/1395249824.M568465P26233.mail,S=6623,W=6782
sudo mv /home/spam/.maildir/new/1395249824.M568465P26233.mail,S=6623,W=6782 /home/user/.maildir/new/

Thanks to Faisal.