Filtering e-mail with procmail on a Unix host (regular version)
We are adding headers to mail messages which we think are spam:
X-CU-Spam: by clyde: reason it is spam
X-CU-Test-Spam: by clyde: reason it is spam
X-CU-Score-Spam: by clyde: spamassassin: 13 (*************)
X-CU-DNSBL: by clyde: DNSBL: (some-IP-address by some-list)
You can filter messages tagged with any of the above-mentioned headers out of your regular mail stream, using the filter capability in your e-mail software. Anti-spam guinea-pigs should filter on X-CU-Test-Spam, in particular.
Here's how to set up mail filters on our special headers, using procmail on a Unix host. This assumes that you read your mail in "Unix mailbox format", as is used by Pine, Elm, Mail, etc.
First, make sure that procmail is enabled on your account; your sysadmin or help desk should be able to provide you with instructions on how to do this.
Now edit your file ".procmailrc" using your favourite text editor.
If you are an Alcor user with an old procmail installation, edit your file ".procmail/Main" instead. If you are a menushell user, you can start up an easy text editor by typing "!" to escape to a command, then:
pico -w ~/.procmail/Main
Move forward in the file to an appropriate place to add spam filing recipes. (If you are an Alcor user with an old procmail installation, move to the end of the section called "more fancy processing".) Insert these three lines to refile tagged messages:
:0: * ^X-CU-Spam: $HOME/mail/name-of-your-spam-folderIf you are an anti-spam guinea-pig, add another three lines to refile messages tagged by the software under test:
:0: * ^X-CU-Test-Spam: $HOME/mail/name-of-your-TEST-spam-folderInsert these three lines to refile messages tagged with X-CU-Score-Spam:
:0: * ^X-CU-Score-Spam: $HOME/mail/name-of-your-SCORE-spam-folderInsert these three lines to refile messages tagged with X-CU-DNSBL:
:0: * ^X-CU-DNSBL: $HOME/mail/name-of-your-DNSBL-folderTechnical notes: This will catch the presence of the indicated headers.
Once you have set up the above filters, please check your "spam" mailbox folder regularly and empty it out, after checking whether any legitimate e-mail accidentally got caught.
If you are an anti-spam guinea-pig, please check your "test-spam" mailbox folder daily, and be sure to report any legitimate mail that got caught.
|
Copyright, © 2007,
Concordia University,
(IITS).
|
|