using common tools procmail, spamassassin and perl to handle spam
prep: folder for testing: spam_dev_null_test
create .promailrc
setup simple rules that send spam to spam_dev_null_test
once they have been tested, send mail to /dev/null
install spamassassin, filter these into spamassassin folder, later post-process once I have seen what it does
manually save missed/skipped spam to folder 'spam' for later analysis and incorporating rules into procmail
rules for spam email:
never auto-respond
maintain and monitor procmail log
follow a series of simple steps to manage spam:
1 manually move spam from inbox into spam folder
2 create spam procmail rules from mail in 'spam' folder and redirect this spam to spam_dev_null_test
3 if rules behave exactly as expected redirect to /dev/null, otherwise fix rules and continue spam_dev_null_test (or equivalent test)
create .procmailrc in $HOME with:
...
MAILDIR=$HOME/mail
LOGFILE=$HOME/logs/procmail.log
LOGABSTRACT=all
SPAM=$MAILDIR/spam
DEVNULL=$MAILDIR/spam_dev_null_test
### spam control
:0:
*^From.*(/pattern1|pattern2/i)@hostname.domain
$DEVNULL
...
other resources:
http://spamassassin.apache.org/
http://wiki.apache.org/spamassassin/SingleUserUnixInstall?highlight=%28source%29%7C%28procmail%29%7C%28%3ASpamAssassin%29%7C%28use%29
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-email-mda.html
http://pubpages.unh.edu/notes/spamassassin.html
http://search.cpan.org/search?query=spamassassin&mode=all (select the latest version)
http://search.cpan.org/~felicity/Mail-SpamAssassin-3.0.4/lib/Mail/SpamAssassin.pm (latest in July 2005)