PATH=/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/home/gilbertt/bin:/usr/local/bin:/usr/X11R6/bin SHELL=/bin/bash # "VERBOSE=on" is only used for debugging. VERBOSE=off SENDMAIL=sendmail MAILDIR=$HOME/mail DEFAULT=$MAILDIR/Inbox LOGFILE=$HOME/.procmail_log #LOGABSTRACT = "all" # ====================================== # Preventing duplicates using 16Kb cache # They get shoved in duplicates folder :0 Whc: .msgid.lock | formail -D 16384 .msgid.cache :0 a /dev/null # handy variables NL=" " # ========================================================================== # Correct crap or broken mails using sed # ========================================================================== # Correct wrong sig-dashes, ie add a space for lines with only "--" in them: # from: ^--$ # to: ^-- $ #:0 fBw #* ^--$ #| sed -e 's/^--$/-- /' # # preconverts all plain-text mail arriving in certain encoded # # MIME formats into a more compact 8-bit format which can be # # used and displayed more easily by most programs. # :0 # * ^Content-Type: *text/plain # { # :0 fbw # * ^Content-Transfer-Encoding: *quoted-printable # | mimencode -u -q # # :0 Afhw # | formail -I "Content-Transfer-Encoding: 8bit" # # :0 fbw # * ^Content-Transfer-Encoding: *base64 # | mimencode -u -b # # :0 Afhw # | formail -I "Content-Transfer-Encoding: 8bit" # } # # # Convert old-style PGP messages to MIME # :0 # * !^Content-Type: message/ # * !^Content-Type: multipart/ # * !^Content-Type: application/pgp # { # :0 fBw # * ^-----BEGIN PGP MESSAGE----- # * ^-----END PGP MESSAGE----- # | formail \ # -i "Content-Type: application/pgp; format=text; x-action=encrypt" # # :0 fBw # * ^-----BEGIN PGP SIGNED MESSAGE----- # * ^-----BEGIN PGP SIGNATURE----- # * ^-----END PGP SIGNATURE----- # | formail \ # -i "Content-Type: application/pgp; format=text; x-action=sign" # } # # :0 fBw # * ^-----BEGIN PGP PUBLIC KEY BLOCK----- # * ^-----END PGP PUBLIC KEY BLOCK----- # | formail -i "Content-Type: application/pgp-keys; format=text;" ################### # 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` :0: * ^From: HotUKDeals $DEFAULT :0: * ^X-ML-Name: ruby-talk lists/ruby-talk@ruby-lang.org :0: * ^Subject: Hand History from PartyPoker.com lists/partypoker ################################################################## # 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 # copy to gmail :0 c * !^From: HotUKDeals * !^From: Cron * !^From: Anacron * !^From: Mailer-Daemon * !^From: root ! tom.gilbert@gmail.com ##################################### # Last rule: Put mail into mailbox # ##################################### :0: $DEFAULT # End of file