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
|
divert(-1)
# This is a variation on the tradinal RBL filters that dumps email to
# a separate user rather than bouncing it back. It is recommended that
# a user spam be created to recieve the mail.
# This works as discussed in the web page http://maps.vix.com/
# The two ways to use the MAPS RBL are: transfer and inquiry. In
# inquiry mode you start by knowing the IPv4 dotted quad address of
# some host or mail relay, and you use some network protoco l to ask
# MAPS whether that host is listed in the RBL. If the host is so
# listed, you can choose a next step which is appropriate to your site
# security policy. At our site we reject all mail from hosts listed in
# the MAPS RB L, and some of our hosts also route all traffic destined
# for such hosts to a local black hole .
# The rules below direct all such mail to a designated spam
# user. Please note that this means the mail is not rejected, and the
# spammer has no incentive to stop; the default configuration rejects
# the mail with an error; and this not totally in line with the intent
# of the Mail Abuse Prevention System's Realtime Blackhole List. The
# are trying to make sure the spammers are delibrately
# disconnected. For this reason, I have provided a means of rejecting
# the message (by uncommenting a line) just like the original
# configuration does.
# Please use this hack after due consideration, this is not for every
# one.
# The simplest way to get started using the MAPS RBL to protect your
# mail relay ag ainst theft of service by spammers is to arrange for
# it to make a DNS query (of a stylized name) whenever you receive an
# incoming mail message from a host whose spam status you do not
# know. In Sendmail (version 8.8 or later), this is done using
# configuration rules like these:
divert(0)
VERSIONID(`@(#)my_rbl.m4 1.2 (Manoj Srivastava) 1998-02-05')
PUSHDIVERT(6)
# Login of the user selected to recieve all spam
D{SpamUser} ifelse(_ARG_, `', `spam', `_ARG_')
POPDIVERT
divert(2)
LOCAL_RULESETS
S98
# Try and ensure that the sender is not blacklisted
R$* $: $1 $| $(dequote "" $&{client_addr} $)
R$* $| $1 # no match, restore
# check with upstream site
R$* $| $-.$-.$-.$- $: $1 $| $(host $5.$4.$3.$2.rbl.maps.vix.com. $: OK $)
# handle results of lookup
R$* $| OK $1 # no match, restore
R$* $| $1 # no match, restore
# Comment this line, and un comment the next to actually reject the message
R$* $| $+ ${SpamUser} < @ $j . > # save to spam user
#R$* $| $+ $#error $@ 5.7.1 $: " Mail from " $(dequote "" $&{client_addr} $) " refused, see http://maps.vix.com/rbl/"
divert(0)
|