Promail Filtering

Advanced Procmail Filtering

------- cut here --------------

MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/procmail.log
SPAMASSASSIN = spamassassin

### Get Subject of email
SUBJ_=`formail -x"Subject: " \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`

######### BASIC FILTERS #########

# Delete these emails with this subject
:0
* ^Subject.*A Virtual Card for You.*
/dev/null

# Store messages from your boss in a separate folder
:0
* ^From.*john@doe.com
boss

# Do not want email from any of these people:
# sales@mail.com
# <anyone>@stuff.com
# <anyone>@<anything_here>freemail.com
:0
* ^From.*(sales@mail.com)|(.*@stuff.com)|(.*@*freemail.com)
/dev/null

# Traditional mailing list detection
:0
* ^TO()faq-users@list.org
lists/faq

# Move mailing lists to a folder based on Return-Path
:0
* ^Return-Path:.*procmail-request@informatik
lists/procmail

##### SPAMASSASSIN ##########
:0fw
* < 256000
| $SPAMASSASSIN -L

:0
* ^X-Spam-Status: Yes
{
LOGFILE=$MAILDIR/spam.log
:0
junk
}

# otherwise deliver to $DEFAULT

-------- to here ----------------

 
Link To CSE Sourses Link To CSE Student Home Pages Link To CSE Facilities Link To CSE Help Page Link To CSE Calendar


3115 Engineering Building
East Lansing, MI 48824-1226
Phone: (517) 353-3148
Fax: (517) 432-1061
web@cse.msu.edu