SHELL=/bin/sh PROCMAILDIR=$HOME/.procmail MAILDIR=$HOME/Maildir DEFAULT=$MAILDIR/new TUNSURE=$MAILDIR/.T-UNSURE/new TSPAM=$MAILDIR/.T-SPAM/new WHITELIST=$PROCMAILDIR/whitelist.txt BLACKLIST=$PROCMAILDIR/blacklist.txt USERPROCMAILRC=$PROCMAILDIR/userprocmailrc USE_USER_PROCMAILRC=no ### log options ### LOGABSTRACT=no VERBOSE=no LOGFILE=$PROCMAILDIR/log ### clasic white- and blacklist ### :0 * ? test -f $WHITELIST * ? formail -x"From" -x"From:" -x"Sender:" -x"Reply-To:" -x"Return-Path:" -x"To:" | egrep -is -f $WHITELIST $DEFAULT :0 * ? test -f $BLACKLIST * ? formail -x"From" -x"From:" -x"Sender:" -x"Reply-To:" -x"Return-Path:" -x"To:" | egrep -is -f $BLACKLIST /dev/null :0 * BAYES ?? yes { #### bogofilter passthrough #### # -p)assthrough -u)pdate, -l)og -e)xitcode 0 for spam and ham -v)erbose :0fw | bogofilter -p -e :0e { EXITCODE=75 HOST } #### Spam handling #### :0 * KILL_SPAM ?? yes * ^X-Bogosity: Spam,.* /dev/null :0 * ^X-Bogosity: Spam,.* $TSPAM #### Unsure handling #### :0 * UNSURE_IN_INBOX ?? yes * ^X-Bogosity: Unsure,.* $DEFAULT :0 * ^X-Bogosity: Unsure,.* $TUNSURE } ### Check for customized user procmail rules ### :0 * USE_USER_PROCMAILRC ?? yes * ? test -f $USERPROCMAILRC { INCLUDERC=$USERPROCMAILRC } ### Default handling ### :0 * $DEFAULT