File: junkfilter

package info (click to toggle)
junkfilter 19990331-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 336 kB
  • ctags: 6
  • sloc: sh: 155; makefile: 36
file content (147 lines) | stat: -rw-r--r-- 3,172 bytes parent folder | download
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# 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 19990331
# $Id: junkfilter,v 2.23 1999/03/31 11:07:13 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=19990331
LINEBUF=65536
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]|[1-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=$JFUSERDIR/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=[^-_.a-z0-9]
	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