0

How can I configure Procmail and SpamAssassin to catch spam?

Kara Marfia
  • 7,892
  • 5
  • 33
  • 57
freddiefujiwra
  • 1,667
  • 5
  • 25
  • 34

1 Answers1

2
#spam assain
:0fw
| spamassassin 2>> ~/logs/spam_log
:0:
* ^X-Spam-Status: Yes
     .spam/

Is the bit of my .procmailrc that actually catches spam. My spam assassin user_prefs then looks something like this.

ok_locales en
use_bayes 1
bayes_min_ham_num 100
bayes_min_spam_num 100
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status

You'll probably want to toggle ok_locales for where you live, and this relies heavily on bayesian filtering, so you'll need to feed your filters regularly with something along the lines of

 sa-learn --showdots --spam --file ~/Maildir/.spam/cur
 sa-learn --showdots --spam --file ~/Maildir/.inbox/cur
Cian
  • 5,838
  • 1
  • 28
  • 40