This is the spam-filtering procmail script I currently use.
Paul Howarth <firstname.lastname@example.org>
- Sample procmailrc that calls up procvars and spamcheckrc
Edit this to suit your own needs, and store it as
- Personalisations to suit the end-user. Includes your email
addresses and details of mailing lists and other people you
may receive BCC'ed mail from. Put it in directory
- The spam filter itself. Probably doesn't need editing.
Put it in $HOME/.nospam
- Subroutine used to examine a single Received: header.
Shouldn't need editing. Put it in $HOME/.nospam
- Script to evaluate the overall "spam score" of a mail item.
The bigger the number, the more likely it's spam. Adds up
the scores in the X-Reject: headers added by spamcheckrc.
Put it somewhere in your PATH, e.g. $HOME/bin
- Script to evaluate the hostname of the most heavily advertised
site in a message. The name is tested for known spammer
signs. Put it somewhere in your PATH, e.g. $HOME/bin
- Decides what to do with the message based on the score.
I deliver mail with scores <50 normally, mail with scores
50-99 in folder likely-spam as well as delivering it normally,
and mail with scores 100+ is just delivered to folder junkmail.