# vim: set ts=2 sw=2 et syntax=procmail: PATH=/usr/local/bin:/usr/bin:/bin DEFAULT=/var/mail/$LOGNAME ## uncomment the next line if you would like logging #LOGFILE=$HOME/procmail.log ## uncomment the next two lines if you want really verbose logging #VERBOSE=yes #LOGABSTRACT=all ################################################################################ ## STAGE 1 - CLASSIFICATION ## pipe email to SpamAssassin for classification ## only process emails shorter than 256k (most spam is short) :0fw:spam.lock * < 256000 | spamc -f # handle SpamAssassin errors gracefully :0e { EXITCODE=$? } ################################################################################ ## STAGE 2 - FILTERING SPAM EMAIL ## choose one of option 2.1, 2.2, 2.3 or write your own ## option 2.1 enabled (uncommented) by default ## option 2.1: configure your client to filter spam; all fall through ## you need to configure your email client to filter based on one of ## the following headers: ## X-Spam-Flag: YES ## X-Spam-Status: Yes, hits=[\d+\.\d+] required=[\d+\.\d+] ## where [\d+\.\d+] matches floating point numbers (e.g., 13.1 or 4.7) ## X-Spam-Level: ******* ## where the number of asterisks equals the number of hit points ## (e.g., 13 asterisks for values between 13.1 and 13.9) ## no procmail recipe associated with this option so nothing to uncomment ## option 2.2: delete spam with 15 points or more; rest fall through #:0 #* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* #/dev/null ## option 2.3: delete all spam (warning: false positives also deleted) #:0 #* ^X-Spam-Flag: YES #/dev/null ################################################################################ ## STAGE 3 - FILTERING NON-SPAM EMAIL WITHOUT ADDRESS EXTENSIONS ## choose one of option 3.1, 3.2, 3.3 or write your own ## option 3.1 enabled (uncommented) by default ## vacation processing (uncomment next two lines to go on vacation) #:0c #| vacation ${LOGNAME} ## option 3.1: spool file only (normal behaviour for POP users) :0 ${DEFAULT} ## option 3.2: forward and spool file #:0c #! nobody@example.com # #:0 #${DEFAULT} ## option 3.3: forward only; no spool file #:0 #! nobody@example.com