LOG="rc.local.s10 --begin " SECURITY_NOTIFY="postmaster, mmokrejs" SECURITY_QUARANTINE=/scratch/procmail/quarantine SECURITY_QUARANTINE_OPTIONAL="postmaster" SECURITY_NOTIFY_SENDER=YES SECURITY_STRIP_MSTNEF=YES MANGLE_EXTENSIONS="html?|exe|com|cmd|bat|pif|sc[rt]|lnk|dll|ocx|vb[se]?|hta|p[lm]|sh[bs]|hlp|chm|eml|ws[cfh]|ad[ep]|jse?|ms[ip]|reg|asd|cil|asx|wm[szd]" POISONED_EXECUTABLES=/etc/procmail/poisoned-files POISONED_SCORE=25 SCORE_DETAILS=YES SCORE_HISTORY=/scratch/procmail/macro-scanner-scores INCLUDERC=/etc/procmail/html-trap.procmail # Expect that Subject: line will sometimes contain text in quoted-printable # encoding, so the following recipe would fail to detect # Re: [montana] Bulharsko - Rila # but would see # ?iso-8859-2?Q?Re=3A=20=5Bmontana=5D=20Bulharsko=20=2D # So you will end up with # [montana] Re: [montana] Bulharsko - Rila # which is what we did not want to get. ;( # # procmail: Match on ! "Subject:.*\[montana\]" # procmail: Match on ! "Subject:[ ]*((R|r)(e|E)|Odpov*):[ ]*" # procmail: Extraneous filter-flag ignored # procmail: Extraneous deliver-head flag ignored # procmail: Executing "formail,-zx,Subject:" # procmail: Assigning "SUBJ==?iso-8859-2?Q?Re=3A=20=5Bmontana=5D=20Bulharsko=20=2D=20Rila?=" # procmail: Executing " formail -I "Subject: [montana] $SUBJ"" # It's good to kill quoted-printable encoding in headers using dmmh. # see also http://www.natur.cuni.cz/~mmokrejs/procmail/mobile/ # De-mangle RFC 2047 header mangling # We have to convert QP now, otherwise the test for [listname] below will fail :0Hfw * =\?[^?]+\?[qb]\?[^?]+\?= | $HOME/bin/dmmh # extract the subject ONLY IF the listname is NOT YET present in the Subject # # take care of email from The Bat 1.53d, which have: # Re[2]: [montana] Kdo je dist.... # :0 * ! ^Subject:[ ]*\[montana\][ ]*(RE|Re|re): { :0 * ! ^Subject:[ ]*(RE|Re|re):[ ]*\[montana\] { :0 * ! ^Subject:[ ]*(RE|Re|re)(\[[0-9]+\]|):[ ]*\[montana\] { SUBJ=`formail -zx Subject:` } LOG="Calling formail " # if the preceding recipe succeeded :0faw | formail -I "Subject: [montana] $SUBJ" } } LOG="rc.local.s10 --end "