# DELIVERY.RC # # A file of recipes to deliver email after it has been filtered # by the SpamBouncer, that provides a few more options and # somewhat more flexibility than the SpamBouncer's own delivery # options. # # NOTE: Add the variables beneath this note section to the # Variables section at the top of your .procmailrc file. DO # NOT PUT THEM AT THE BOTTOM OF THE FILE! Change the values to # fit your local system. # # The SBDELIVERY setting tells the SpamBouncer not to use its # own internal delivery procedures, but to filter email and then # return it to the ongoing procmail mail stream, so that you can # continue filtering it and deliver it as you want. # # The NEWMAIL file is a file of non-whitelisted email that also # isn't classified as spam or blocked. You can use it to separate # whitelisted email/known good email from other email if you want. # If you don't want to separate them, just change the line below # to NEWMAIL=${DEFAULT}, and non-whitelisted email will be sent # to your inbox just as whitelisted email is. # # The QUARANTINE file is a file of suspected viruses, trojans, # or email containing other types of content that might hijack # your computer or have other effects you don't expect. :/ I # highly recommend examining such email on a Unix server, if # you can. Most of it is dangerous only to Microsoft Windows # computers. # # You might also want to set VIRUSFOLDER=/dev/null to ensure that # viruses get deleted outright. The virus filters have almost # never generated a false positive, and viruses pile up these days # because there are so many of them. Nuking them saves disk # space. # NEWMAIL=${MAILDIR}/new.incoming # QUARANTINE=${MAILDIR}/quarantine.incoming # SBDELIVERY=FILTER # VIRUSFOLDER=/dev/null # NOTE: You can use these scripts one of two ways: # # * You can insert them into your .procmailrc file, # at the bottom. # # * You can save them as a separate file -- I call mine # "delivery.rc" -- in your home directory, and then # reference that file at the bottom of your .procmailrc # as follows: # # INCLUDERC=${HOME}/delivery.rc # # If you receive legitimate email in Chinese, Japanese, Korean # or Russian (four languages in which a lot of spam is sent, and # which many people cannot read and never receive as legitimate # email), you need to edit the "Useless Cr*p" section to remove # the appropriate lines. You can just delete the line on which # the language appears and the recipe will be otherwise intact. # File Whitelisted Email :0: * ^X-SBPass: (GlobalNoBounce|NoBounce|Whitelisted)$ | ${FORMAIL} -A"X-Folder: Whitelisted" >>${DEFAULT} # File Viruses :0: * ^X-SBClass: Virus$ | ${FORMAIL} -A"X-Folder: Virus" >>${VIRUSFOLDER} # File Dangerous Content. Put emails with Dangerous # Content from addresses in your NOBOUNCE or GLOBALNOBOUNCE # files into the QUARANTINE folder. Put other such # emails in the SPAMFOLDER. LOCALTAG=no :0 * ^X-SBStop: DANGER! { :0 * ! FROMEMAIL ?? ^noemail@example.com$ * ? ${GREP} -i -x "${FROMEMAIL}" ${NOBOUNCE} { LOCALTAG=yes } :0 * ! LOCALTAG ?? yes * ! REPLYTOEMAIL ?? ^noemail@example.com$ * $ ! REPLYTOEMAIL ?? ^${FROMEMAIL}$ * ? ${GREP} -i -x "${REPLYTOEMAIL}" ${NOBOUNCE} { LOCALTAG=yes } :0 * ! LOCALTAG ?? yes * ! FROMDOMAIN ?? ^example.com$ * ? ${GREP} -i -x "${FROMDOMAIN}" ${NOBOUNCE} { LOCALTAG=yes } :0 * ! LOCALTAG ?? yes * ! FROMDOMAIN ?? ^example.com$ * $ ! REPLYTODOMAIN ?? ^${FROMDOMAIN}$ * ? ${GREP} -i -x "${REPLYTODOMAIN}" ${NOBOUNCE} { LOCALTAG=yes } :0 * ! FROMEMAIL ?? ^noemail@example.com$ * ? ${GREP} -i -x "${FROMEMAIL}" ${GLOBALNOBOUNCE} { LOCALTAG=yes } :0 * ! LOCALTAG ?? yes * ! REPLYTOEMAIL ?? ^noemail@example.com$ * $ ! REPLYTOEMAIL ?? ^${FROMEMAIL}$ * ? ${GREP} -i -x "${REPLYTOEMAIL}" ${GLOBALNOBOUNCE} { LOCALTAG=yes } :0 * ! LOCALTAG ?? yes * ! FROMDOMAIN ?? ^example.com$ * ? ${GREP} -i -x "${FROMDOMAIN}" ${GLOBALNOBOUNCE} { LOCALTAG=yes } :0 * ! LOCALTAG ?? yes * ! FROMDOMAIN ?? ^example.com$ * $ ! REPLYTODOMAIN ?? ^${FROMDOMAIN}$ * ? ${GREP} -i -x "${REPLYTODOMAIN}" ${GLOBALNOBOUNCE} { LOCALTAG=yes } :0: * LOCALTAG ?? yes | ${FORMAIL} -A"X-Folder: Quarantine" >>${QUARANTINE} :0: * LOCALTAG ?? no | ${FORMAIL} -A"X-Folder: Spam" >>${SPAMFOLDER} } # File Spam :0: * ^X-SBClass: Spam$ | ${FORMAIL} -A"X-Folder: Spam" >>${SPAMFOLDER} # File Useless Cr*p :0 D: * ^X-SBRule: (.* is in CBL.*|\ .* is in OPM.*|\ .* is in SBL.*|\ .* is in XBL.*|\ .*Chinese|\ .*Japanese|\ .*Korean|\ .*Russian|\ Defanged Virus.*|\ Spam Haven Domain.*|\ Spam Haven IP.*|\ Unnecessary Base64 Encoding|\ .*Virus Notification.*)$ | ${FORMAIL} -A"X-Folder: Spam" >>${SPAMFOLDER} # File Blocked Email :0: * ^X-SBClass: Blocked$ | ${FORMAIL} -A"X-Folder: Blocked" >>${BLOCKFOLDER} # File Bulk :0: * ^X-SBClass: Bulk$ | ${FORMAIL} -A"X-Folder: Bulk" >>${BULKFOLDER} # File Admin :0: * ^X-SBClass: Admin$ | ${FORMAIL} -A"X-Folder: Admin" >>${ADMINFOLDER} # File Remainder :0: | ${FORMAIL} -A"X-Folder: New Mail" >>${NEWMAIL}