1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
# junkfilter
# a junk email filter system for procmail
# Copyright 1997-2002 Gregory Sutter <gsutter@zer0.org>
#
# $Id: junkfilter.bodychk,v 2.21 2002/10/04 22:04:33 gsutter Exp $
#
# Please read the file "README" and the page
# http://junkfilter.zer0.org/ before using junkfilter.
# Is there a listed phrase in the body of the message?
JFSEC="bodychk"
JFBADJ="(best|(bigg?|hott?|low|new)(est)?)"
JFBAPOL="(pardon|excuse|app?ologize|sorry)( for| about)?"
JFBCARD="(Visa|Mastercard|Master Card|Master Charge|Mastercharge|M/C|MC|AMEX|American Express|Discover)"
JFBMAIL="((e-? ?)?mail(ing)?|messag(e|ing)|distr(o|ib(ution)?)|info(rmation)?)(ed|s)?"
JFBPOSS="(a(ll)?|any|future|my|y?our|the|this|este|la|el|nuestra)"
JFBLIST="($JFBPOSS )?($JFBMAIL )?lista?"
JFBPNUM="((\+?1)?[-( ]?[0-9][0-9][0-9][-) ]?[0-9][0-9][0-9][- ]?[0-9][0-9][0-9][0-9])"
#JFBRM="([\'\"? ]|")*((d ?e ?l ?e ?t ?|r ?e ?m ?[o0] ?v ?)(e ?|a ?l|e ?[dr]))([\'\"?, ]|")*"
JFBRM="([\'\"? ])*((d ?e ?l ?e ?t ?|r ?e ?m ?[o0] ?v ?)(e ?|a ?l|e ?[dr]))([\'\"?, ])*"
#JFBREMV="(to|to be|for) [\'\"? ]*((delet|rem[o0]v)(e|al|ed))[\'\"? ]*"
JFBREMV="(to|to be|for)${JFBRM}"
#JFBRLIST="((global|universal) )?[\'\"? ]*((delet|rem[o0]v)(e|al|ed))[\'\"? ]*lista?"
JFBRLIST="((global|universal) )?${JFBRM}lista?"
JFBVIA="(against|avec|through|to|using|with|via)"
JFBYOU="you( have|ve|\'ve)?"
JFBOBFUSC="%[0-9a-f][0-9a-f]"
# XXX JFBODYCHK must be assigned before JFDOMLIST. Bug in procmail?
JFBODYCHK=`cat $JFDIR/jf-bodychk`
JFADDRLIST=`cat $JFDIR/jf-addresses`
# Set up the list of domains to be checked, if enabled.
:0
* $ $JF_OPT_BODYDOMAIN^0
{
JFDOMLIST=`cat $JFDIR/jf-domains`
}
# The following lines containing $JFBODYCHK are expanded twice, with the
# two $ at the beginning of each line. This is to allow the variables in
# the jf-bodychk to be expanded. This is not done for the user bodychk
# because the extra variable escape can make the regexps rather complex.
# To enable it, though, add an extra "$" and "\" to this line:
# * $ ()\/${JFUSERBODYCHK:-$JFNOMATCH}
# so that it appears as
# * $ $ ()\/${JFUSERBODYCHK:-\$JFNOMATCH}
# check the body for catchwords
:0 B
* < 60000
* $ $ ()\/${JFBODYCHK:-\$JFNOMATCH}
{ JFMATCH="$JFSEC: $MATCH" INCLUDERC=$JFDIR/junkfilter.match }
# if that didn't get 'em, check the domains file
:0 BE
* < 60000
* $ (^|[^-a-z0-9])\/(${JFDOMLIST:-\$JFNOMATCH})([^-a-z0-9]|$)
{ JFMATCH="$JFSEC-domains: $MATCH" INCLUDERC=$JFDIR/junkfilter.match }
JFDOMLIST
JFBODYCHK
:0
* $ $JF_BODYCHK_USER^0
{
JFUSERBODYCHK=(`cat $JF_BODYCHK_USER_LOC`)
:0 B
* < 60000
* $ ()\/${JFUSERBODYCHK:-$JFNOMATCH}
{ JFMATCH="${JFSEC}-User: $MATCH" INCLUDERC=$JFDIR/junkfilter.match }
JFUSERBODYCHK
}
JFSEC
# EOF junkfilter.bodychk
|