# junkfilter # a junk e-mail filter system for procmail # Copyright 1997-98, Gregory Sutter # and Matthew Hunt # # Please read the file "junkfilter.readme" and the page # http://www.pobox.com/~gsutter/junkfilter/ before using # junkfilter. junkfilter is copyright 1997-98 Gregory # Sutter and Matthew Hunt. All rights reserved. # Section Two, reasonable spam-catching recipies JFSEC=2 # Phil Guenther's new Message-Id: rule :0 * ()^Message-Id:\/.* * ! ^Message-Id:[ ]*<[ ]*("([^"\]|\\.)*"|[-!#-'*+/-9=?A-Z^-~]+)\ ([ ]*\.[ ]*("([^"\]|\\.)*"|[-!#-'*+/-9=?A-Z^-~]+))*\ [ ]*@[ ]*\ (\[[ ]*([^][\]|\\.)*[ ]*\]|\ [-!#-'*+/-9=?A-Z^-~]+([ ]*\.[ ]*[-!#-'*+/-9=?A-Z^-~]+)*)\ [ ]*> { JFEXP="$JFSEC: Invalid Message-Id: $MATCH" } # Message-ID added by an enroute or local mail machine :0 * $ ^Message-Id:[ ]+<.*@([-_a-z0-9]+\.)*$JFMAILDOM> * ^From:.*@ * $! ^From:.*@([-_a-z0-9]+\.)*$JFMAILDOM * $ ^Received:.*from.*\(([-_a-z0-9]+\.)*\/[-_a-z0-9]+\.$JFTLD\> { JFSRCDOM=$MATCH TEMPSAVE=$SHELLMETAS SHELLMETAS JFSRCDOM=`expr "$JFSRCDOM" : '\(.*\).'` SHELLMETAS=$TEMPSAVE :0 * $ ^Received:.*from.*$JFSRCDOM.*by ([-_a-z0-9]+\.)*$JFMAILDOM * $ JFSRCDOM ?? $JFMAILDOM { JFEXP="$JFSEC: Message-Id added by local mail host" } } # Invalid X-UIDL header, contains non-hexadecimal characters. :0 * ^X-UIDL: * !^X-UIDL:[ ]*[^0-9a-f]+[ ]*$ { JFEXP="$JFSEC: Invalid X-UIDL" } # number@, @number.com or number@number.com address : spam. # almost. additions made to the exception list only as necessary. :0 * ()\/^From:.*\<([0-9]+@|@[0-9]+\.com) * !^From:.*@((1776|2600|mcimail)\.com|brookes\.ac\.uk)\> * !^From:.*\<[0-9][0-9][0-9][0-9][0-9][0-9]\.[0-9][0-9][0-9][0-9]@compuserve\.com { JFEXP="$JFSEC: Numbers at numbers: $MATCH" } # New bad-AOL filter. :0 * $ ^From:\/(.*[^-(.%@a-zA-Z0-9])?[^@<>, ]+@aol\.com\> * $ ! ^From:(.*[^-(.%@a-zA-Z0-9])?([^a-z]|.+[^0-9a-z]|............).*@aol\.com\> { JFEXP="$JFSEC: Forged AOL account: $MATCH" } JFSEC # EOF junkfilter.two