# based on http://linuxbrit.co.uk/procmail PATH=/bin:/usr/bin:/usr/local/bin:/mail/bin SHELL=/bin/bash VERBOSE=off MAILDIR=$HOME/mail DEFAULT=$HOME/mail/Inbox LOGFILE=$HOME/.procmail.log SPAM=$HOME/mail/SPAM SPAMMERS=$HOME/mail/spammers # avoid duplicates :0 Whc: msgid.lock | formail -D 16384 msgid.cache :0 a: duplicates # handy variables NL=" " ################### # Mailing lists # ################### # # I changed this setup recently. Now I'm on a million lists, it's nice to # know the hostname as well as the list name. If you want just the listname # for the mail folder, use something like: # # * ^X-Mailing-List:[ ]<\/[^@]+ # lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` # # And the same for the others. :0: * ^X-Mailing-List:[ ]<\/[^ >`']+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` :0: * ^X-Mailing-List:[ ]\/[^ `']+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` :0: * ^X-Mailman-Version: * ^X-BeenThere:[ ]\/[^ `']+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` :0: * ^Sender:[ ]owner-\/[^ `']+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` :0: * ^Delivered-To:[ ]mailing list \/[^ `']+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` :0: * ^X-Loop:[ ]\/[^ `']+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` :0: * ^Mailing-List:[ ]list[ ]\/[^ `';]+ lists/`echo $MATCH | sed -e 's/[\/]/_/g' | tr A-Z a-z` ################################################################## # SPAM filter. I don't like spam. I just don't # ################################################################## :0fw:spamassassin.lock |/usr/bin/spamc :0: * ^X-Spam-Status: Yes * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\* DEFINITELY_SPAM :0: * ^X-Spam-Status: Yes SPAM ##################################### # Last rule: Put mail into mailbox # ##################################### :0: $DEFAULT # End of file