# junkfilter # a junk email filter system for procmail # Copyright 2004 Gregory Sutter # # $Id$ # # Please read the file "README" and the page # http://junkfilter.zer0.org/ before using junkfilter. # This is junkfilter.crm114, which calls the Configurable Regex # Mutilator (http://crm114.sf.net/) JFSEC=crm114 ## check for X-CRM114-Status: header and capture if present #:0 #* ^X-CRM114-Status:[ ]*\/.* #{ JFXCS=$MATCH } #| sed -e 's/^\*\* CRM114 Whitelisted by: [-.A-Za-z0-9]+ \*\*$//' #| sed -e 's/^\*\* CRM114 Whitelisted by: JFIP}|${JFDOMNAM}\.${JFTLD}) \*\*$//' # remove CRM tags from messages :0 Bf * $ ^\/\*\* CRM114 Whitelisted by: (${JFIP}|${JFDOMNAM}\.${JFTLD}) ** | sed -e 's/^${MATCH}$//' # call crm114. If your crm114 files aren't in $HOME/.crm114, modify. :0 fw :.crm.lock | crm -u $HOME/.crm114 mailreaver.crm # match crm114 results :0 * ^X-CRM114-Status: SPAM[ ]+\( ?(pR:)? ?\/-?[.0-9]+ { JFMATCH="$JFSEC: score=$MATCH" INCLUDERC=$JFDIR/junkfilter.match } ## remove crm114-generated headers. #:0 fw #| formail -I X-CRM114-Status ## replace original X-CRM114-Status header if there was one. #:0 fw #* $ $JFXCS^0 #| formail -I X-CRM114-Status: $JFXCS JFSEC # EOF junkfilter.crm114