# junkfilter # a junk email filter system for procmail # Copyright 1997-2000 Gregory Sutter # # $Id: junkfilter,v 2.26 2000/03/04 21:24:24 gsutter Exp gsutter $ # # Please read the file "junkfilter.readme" and the page # http://junkfilter.zer0.org/ before using junkfilter. # junkfilter is copyright 1997-2000 Gregory Sutter and # is licensed under the terms of the GNU General Public # License, version 2. See the file junkfilter.readme # for details. # junkfilter, release 20000304 # There shouldn't be anything in this file that is user- # configured. Check the "junkfilter.config" file for # all options. # Get configuration options INCLUDERC=$JFDIR/junkfilter.config # Initialize variables JFVERSION=20000304 JFNL=" " JFEXP JFFROM=^((X-)?(((Envelope-)?Sender|(Apparently-|Resent-)?From)|Return-Path):(.*\<)?) JFFROMREC=^((X-)?(((Envelope-)?Sender|(Apparently-|Resent-)?From)|Return-Path|Received):(.*\<)?) JFUSRNAM=([-._+a-z0-9]+) JFDOMNAM=([0-9a-z][&_0-9a-z]+) JFTLD=(com|edu|gov|mil|net|org|[a-z][a-z]) #JFNEWTLD=(nom|web|inc|corp) JFADDR=($JFUSRNAM@@($JFDOMNAM\.)+$JFTLD) JFNOMATCH="pangalacticgargleblastersareverytastyuntilyouexplode" JFIPNUM=(2([0-4][0-9]|5[0-5])|1[0-9][0-9]|[1-9][0-9]|[0-9]) JFWS="[ ]+" JFSTATUS # Now call the various sections # Is the JF_WHITE section activated? :0 * $ $JF_WHITE^0 { JFVER=([^-_.a-z0-9]) JFVERR=([^-_.a-z0-9]) INCLUDERC=$JFDIR/junkfilter.white } # Is the JF_USER section activated? :0 * $ $JF_USER^0 { INCLUDERC=$JFDIR/junkfilter.user } # Is the JF_ONE section activated? :0 * $ $JF_ONE^0 { INCLUDERC=$JFDIR/junkfilter.one } # Is the JF_TWO section activated? :0 * $ $JF_TWO^0 { INCLUDERC=$JFDIR/junkfilter.two } # Is the JF_THREE section activated? :0 * $ $JF_THREE^0 { INCLUDERC=$JFDIR/junkfilter.three } # Is the JF_FOUR section activated? :0 * $ $JF_FOUR^0 { INCLUDERC=$JFDIR/junkfilter.four } # Is the JF_DIALUPS section activated? :0 * $ $JF_DIALUPS^0 { JFSECTION=dialups JFVER=^Received:.* JFVERR="\\>.*by ([-a-z0-9]+\.)*$JFMAILDOM\\>" JFSECUSER=$JF_DIALUPS_USER JFSECUSERLOC=$JF_DIALUPS_USER_LOC INCLUDERC=$JFDIR/junkfilter.lists } # Is the JF_ADDRESSES section activated? :0 * $ $JF_ADDRESSES^0 { JFSECTION=addresses JFVER=[^-_.a-z0-9] JFVERR JFSECUSER=$JF_ADDRESSES_USER JFSECUSERLOC=$JF_ADDRESSES_USER_LOC INCLUDERC=$JFDIR/junkfilter.lists } # Is the JF_IP section activated? :0 * $ $JF_IP^0 { JFSECTION=ip JFVER=$JFFROMREC JFVERR=\\> JFSECUSER=$JF_IP_USER JFSECUSERLOC=$JF_IP_USER_LOC INCLUDERC=$JFDIR/junkfilter.lists } # Is the JF_HEADERS section activated? :0 * $ $JF_HEADERS^0 { JFSECTION=headers JFVER JFVERR=[^-_a-z0-9] JFSECUSER=$JF_HEADERS_USER JFSECUSERLOC=$JF_HEADERS_USER_LOC INCLUDERC=$JFDIR/junkfilter.lists } # Is the JF_BODYCHK section activated? :0 * $ $JF_BODYCHK^0 { LINEBUF=$JFBLINEBUF INCLUDERC=$JFDIR/junkfilter.bodychk LINEBUF=$JFLINEBUF } # Is the JF_DOMAINS section activated? :0 * $ $JF_DOMAINS^0 { JFSECTION=domains LINEBUF=$JFBLINEBUF JFVER=[^-_a-z0-9] JFVERR=[^-_a-z0-9] JFSECUSER=$JF_DOMAINS_USER JFSECUSERLOC=$JF_DOMAINS_USER_LOC INCLUDERC=$JFDIR/junkfilter.lists LINEBUF=$JFLINEBUF } # Call the OPT section INCLUDERC=$JFDIR/junkfilter.opt # EOF junkfilter