# Sample .procmailrc PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin MAILDIR=$HOME/.nospam LOGFILE=$MAILDIR/procmail.log ME=user@myisp.net LOGABSTRACT=yes INCLUDERC=procvars # Anything with my X-Loop: in it has been here already - # deliver locally before we end up in a loop. :0 * $^X-Loop: $ME { # Add a descriptive header :0 wfh | formail -A "X-Diagnostic: Mail loop detected" :0 $DEFAULT } # Insert my X-Loop: and a Message-ID if necessary to help eliminate looping oldshellmetas="$SHELLMETAS" SHELLMETAS # Save a shell, procmail can do this by itself. :0 Wfh | formail -b -aMessage-ID: -A"X-Loop: $ME" SHELLMETAS="$oldshellmetas" oldshellmetas # Eliminate duplicate deliveries of messages :0 Wh :msgid.lock | formail -D 10000 msgid.cache # Include spam check based on spamdunk (http://www.interlog.com/~waltdnes/spamdunk/spamdunk.htm) # provided the mail isn't one of our mailing lists. :0 *$! $MYLISTS { INCLUDERC=spamcheckrc }