# whitelist example; remove #'s to use # :0: # * ^From: .*user@address.edu.* # $ORGMAIL # blacklist example; remove #'s to use # :0: # * ^From: .*user@address.edu.* # caught-spam
Below "." is a "wild card" that matches any character while "*" will
repeat the match, so ".*ams" will match any string of characters that
contains "ams". To match a period, use "\." A line beginning with "#"
is a comment that is ignored by the filter. $ORGMAIL means your usual
incomming mailbox.
By default these matches are not case sensitive and search the mail
header only. The last example below searches both header and body.
# Saves messages with "AMS" (not case sensitive) in the subject :0: * ^Subject:.*AMS $ORGMAIL # Saves messages from New York Times Direct :0: * ^From:.*nytdirect@nytimes\.com $ORGMAIL # Saves messages from the list server "ems-epc" :0: * ^To.*ems-epc@ $ORGMAIL # Catches any message with "buyit.cn" in the body or header :0 BH * buyit\.cn caught-spamFor more information, see the man pages for "procmailex" and "procmailrc". A Google search on "procmail" yields lots more. [Creating exotic filter recipies is tricky. Not recommended for novices.]