CSE Email System - Server Side Filtering with Procmail
Benefits of procmail:
- Automatically sort email based on subject, sender, recipient
- Filter Spam
- Filter Mailing lists
- Other cool tricks, but that is beyond this scope. Google for procmail recipes
Where does it go:
- Must use Linux. Connect to arctic or use a lab machine
- Your email box is under /user/mail/username/
- It then collects in the Maildir
- Any mailboxes or folders you create will then exist under Maildir
starting with a "." - For example, a folder named Recipes will be in
/user/mail/username/Maildir/.Recipes - Under .Recipes, new email will go in a directory called "new",
anything read with be in "cur" - Using vi, emacs, or whatever editor you prefer, create a file
/user/mail/username/.procmailrc - (Please use your own username,
and yes that is a period before procmailrc)
Sample Recipe:
- Sample /user/mail/username/.procmailrc
--------------cut from here------------------
PATH=/bin:/usr/bin:/usr/bin
LOGFILE=$HOME/procmail.log # Comment out if you do not want logs
VERBOSE=yes # Comment out to remove extra log details
##################################
#
# Basic procmail recipe
#
#
# Mail is stored in /user/mail/$username/Maildir
# Configs in /user/mail/$username
# includes: .procmailrc .forward and .spamassassin
#
# Email is configured to always run Spamassassin
#
# Check out www.cse.msu.edu/facility for more examples
#
##################################
# Example to show subject
# Delete any email with Flame in the subject (send it /dev/null)
:0
* ^Subject:.*Flame
/dev/null
---------------to here-----------------------