# USEFUL FLAGS: # B - egrep the body of the message for pattern # H - egrep the header only # D - use case-sensitive egrep # A - do this only if the last recipe Also matched # E - do this only if the last recipe did NOT match ("else") # c - generate a carbon copy of this mail to see if it matches later recipes # f - pipe it to a filter, but don't consider it deliver # w - wait for the filter to finish before moving on to next recipe # USEFUL ACTIONS: # ! {email} - forward mail to {email} # $MATCH holds the information of the field matched on # A trailing ":" in the first line of the recipe forces the use of lockfiles. ############################################################################### SHELL=/bin/sh #Shell used to run procmail. LINEBUF=4096 #Don't Change. PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11/bin:/usr/local/bin:/csua/bin:./ VERBOSE=off #Debugging Info # Default Program & file locations MAILDIR=$HOME/mail #you'd better make sure this directory exists DEFAULT=/var/mail/mjm BULK=$MAILDIR/BULK BLOCK=$MAILDIR/BLOCK LIST=$MAILDIR/LIST LOGFILE=$MAILDIR/.PROCLOG # BEGIN RECIPES # Nuke duplicate messages :0 Wh: msgid.lock | formail -D 8192 $MAILDIR/.msgid.cache #Label every incoming message as "New" :0 fhw | formail -I "Status: N" # Regenerate "From" lines to make sure they are valid :0 fhw | formail -I "From " -a "From " #Copy every incoming message to $MAILDIR/backup :0 c: backup :0 fwhH * ^From:.*(((hq.acm)\.org)|((247media|enlist|umusic|launch)\.com)|rnsharma|theatre.ru) | formail -A"X-Sorted: ANNOYANCE BLOCK" :0 A: $BLOCKFOLDER :0 fwh *^TO_.*csua@csua\.berkeley\.edu |formail -A "X-Sorted: CSUA" :0 A: $LIST :0: * ^(Apparently-)?(To:|Cc:).*(mjm|mjmiller|mark\.miller) $DEFAULT # Deliver email which passed spam filtering, but which wasn't sent to # a recognizable personal email address of yours, to your "bulk mail" # folder, for reading on a less-urgent basis. :0 fwh | formail -A"X-Sorted: OTHER" :0 A: $BULK