# junkfilter
# a junk e-mail filter system for procmail
# Copyright 1997-98, Gregory Sutter <gsutter@pobox.com>
#
# 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 is licensed under the terms of the GNU
# General Public License, version 2.  See the file
# junkfilter.readme for details.

# junkfilter, release 19980901
# $Id: junkfilter,v 2.2 1998/09/01 19:06:58 gsutter Exp $
# 

# There shouldn't be anything in this file that is user-
# configured.  Check the "junkfilter.config" file for 
# all options.

# Get configuration options

INCLUDERC=$JFUSERDIR/junkfilter.config

# Initialize variables

JFVERSION=19980901
LINEBUF=65536
JFNL="
"
JFEXP
JFFROM=^((X-)?(((Envelope-)?Sender|(Apparently-|Resent-)?From)|Reply-To|Return-Path):(.*\<)?)
JFFROMREC=^((X-)?(((Envelope-)?Sender|(Apparently-|Resent-)?From)|Reply-To|Return-Path|Received):(.*\<)?)
JFDOMNAM=([0-9a-z][&_0-9a-z]+)
JFTLD=(com|edu|gov|mil|net|org|[a-z][a-z])
JFNOMATCH="pangalacticgargleblastersareverytastyuntilyouexplode"
JFIPNUM=(2[0-5][0-5]|1[0-9][0-9]|[1-9][0-9]|[1-9])

# Now call the various sections

# 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=$JFFROMREC
	JFVERR=\\>
	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=\\<
	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=\\>
	JFSECUSER=$JF_HEADERS_USER
	JFSECUSERLOC=$JF_HEADERS_USER_LOC
	INCLUDERC=$JFDIR/junkfilter.lists
}

# Is the JF_BODYCHK section activated?
:0
* $ $JF_BODYCHK^0
{ INCLUDERC=$JFDIR/junkfilter.bodychk }

# Is the JF_DOMAINS section activated?
:0
* $ $JF_DOMAINS^0
{
	JFSECTION=domains
	JFVER=$JFFROMREC
	JFVERR=\\>
	JFSECUSER=$JF_DOMAINS_USER
	JFSECUSERLOC=$JF_DOMAINS_USER_LOC
	INCLUDERC=$JFDIR/junkfilter.lists
}

# Call the OPT section
INCLUDERC=$JFDIR/junkfilter.opt

# EOF junkfilter
