Pick our brains...

How to Tune SpamAssassin Server-Side Spam Filters

The SpamAssassin server-side spam email filter employs Bayesian statistical algorithms to tell the difference between spam and ham.  As such, these filters do their best when they’re “learned”.  Here are some examples from a sample account.

Let’s assume we’re working with a cpanel account called “oicom”, and we want to train the SpamAssassin filters to treat certain imap email folders as spam, and other folders as ham.  These are commands, run from ssh connection / shell, logged in as the particular cpanel / ssh user in question…

 

sa-learn --spam /home/oicom/mail/orionimaging.com/emailchecker/.spam
sa-learn --spam /home/oicom/mail/orionimaging.com/emailchecker/.Junk
sa-learn --ham /home/oicom/mail/orionimaging.com/emailchecker/cur
sa-learn --ham /home/oicom/mail/orionimaging.com/emailchecker/.Personal
sa-learn --ham "/home/oicom/mail/orionimaging.com/emailchecker/.Technical"
sa-learn --ham /home/oicom/mail/orionimaging.com/emailchecker/._Alerts
sa-learn --ham /home/oicom/mail/orionimaging.com/emailchecker/._Interesting

Note that the sa-learn process can definitely put a load on the server, especially if the folder being analyzed is large…