I've mentioned from time to time that I'd post my procmailrc to this list. Here's how it works... all my mail goes through spamassassin. If it is a false positive, or false negative, I "bounce" it to daf-ham or daf-spam (respectively)
My account name on my box is daf. You will want to change this!
My "nice" calls may not be necessary depending on your system.
I use maildirs, you may not. In that case, get rid of the /
# If it's already been through SpamAssassin, do it again, but keep the
# old results for reference
:0fhw
* ^X-Spam-Status:
* !^Envelope-to: daf-spam
| formail -R "X-Spam-Status" "X-Old-Spam-Status"
# For false negatives:
:0
* ^Envelope-to: daf-spam
{
# My mailer adds headers when I "bounce" stuff... remove them.
:0fw
| formail -I Resent-From: -I Resent-Date: -I Resent-To: -I Resent-Message-ID:
# Report it (learn as spam...)
:0c
| nice spamassassin -r
# use -t, so I can see why it was missed
:0fw
| nice spamassassin -t
# save as spam
:0
spam/
}
# False positives
:0
* ^Envelope-to: daf-ham
{
# Again, get rid of "resent" headers
:0fw
| formail -I Resent-From: -I Resent-Date: -I Resent-To: -I Resent-Message-ID:
| spamassassin -d
# Learn as ham
:0c
| nice sa-learn --ham
}
# If not a false positive (or false negative)
:0E
{
# Call spamc
:0fw
| spamc
# Spamc failed? (perhaps not installed (while upgrading))
:0e
spamc-failure/
}
# Get rid of spam
:0
* ^X-Spam-Status:.Yes
spam/
# Continue filing mail as appropriate
--
Duncan Findlay
pgp00000.pgp
Description: PGP signature
