4
|
1 # $Id$
|
0
|
2 #
|
|
3 # lines start with a command token, following by argument tokens
|
|
4 # tokens are separated by spaces or tabs
|
|
5 #
|
|
6 #
|
8
|
7 # content:
|
|
8 # second token is the dns suffix used for the actual lookups
|
|
9 # third token? is a string enclosed in single quotes, so it
|
|
10 # is not really a token. This is the error message, with
|
|
11 # up to two %s parameters for the url and the client ip
|
|
12 # address.
|
|
13 #
|
0
|
14 # dnsbl:
|
|
15 # second token is the name of this dnsbl
|
|
16 # third token is the dns suffix used for the actual lookups
|
|
17 # fourth token? is a string enclosed in single quotes, so it
|
|
18 # is not really a token. This is the error message, with
|
|
19 # up to two %s parameters for the client ip address.
|
|
20 #
|
|
21 # dnsbl_list:
|
|
22 # second token is the name of this list of dnsbls
|
|
23 # subsequent tokes are the names of the previously defined dnsbls
|
|
24 #
|
|
25 # env_from:
|
|
26 # second token is the name of this envelope-from-map. There will
|
|
27 # generally be multiple lines with the same name.
|
|
28 # third token is the envelope from value from the smtp conversation,
|
|
29 # or just the domain part that follows the @ symbol.
|
|
30 # fourth token is BLACK, WHITE, or the name of a previously defined
|
|
31 # envelope-from-map. BLACK causes mail from this sender to be
|
|
32 # rejected with "no such user". WHITE causes mail to be accepted
|
|
33 # and the dns based lists are ignored. DEFAULT may be used to override
|
|
34 # the contents of other maps that are copied into this map, and
|
|
35 # set that sender back to the default (not white or black listed,
|
|
36 # and subject to dnsbl lookups).
|
|
37 #
|
|
38 # env_to:
|
|
39 # second token is the envelope recipient value from the smtp conversation,
|
|
40 # or just the domain part that follows the @ symbol.
|
|
41 # third token is the name of a dnsbl-list, or WHITE or BLACK.
|
|
42 # fourth token is the name of an envelope-from-map, or WHITE or BLACK.
|
|
43 #
|
|
44 # If either one is BLACK, mail to this recipient is rejected with
|
|
45 # "no such user", and the dns lists are not checked.
|
|
46 #
|
|
47 # If the envelope-from-map name is WHITE, mail to this recipient is accepted
|
|
48 # and the dns lists are not checked.
|
|
49 #
|
|
50 # If the envelope-from-map exists, the map is checked for the presence
|
|
51 # of the sender. A WHITE or BLACK answer is definitive and the dns lists
|
|
52 # are not checked.
|
|
53 #
|
|
54 # If the dnsbl-list name is WHITE, the dns lists are not checked and the
|
|
55 # mail is accepted. Otherwise, the dns lists are checked and the mail
|
|
56 # is rejected if any list has an A record for the standard dns based
|
|
57 # lookup scheme (reversed octets of the client followed by the dns suffix).
|
|
58 #
|
|
59 #
|
4
|
60 # include:
|
|
61 # second token is the path name of the dnsbl milter config file to be
|
|
62 # included.
|
|
63 #
|
|
64 #
|
|
65 # include_dcc:
|
|
66 # second token is the name of an envelope-from-map (EMAP below).
|
|
67 # third token is the path name of the dcc whiteclnt config file to be
|
|
68 # included.
|
|
69 # entries from the dcc config are mapped as:
|
10
|
70 # ok -> WHITE (TAG below)
|
|
71 # many -> BLACK (TAG below)
|
|
72 # env_to -> env_to xxx TAG
|
|
73 # env_from -> env_from EMAP xxx TAG TAG
|
|
74 # substitute mail_host -> env_from EMAP xxx TAG TAG
|
4
|
75 #
|
0
|
76 #
|
|
77 #
|
|
78 ##############################################
|
|
79 # define the dnsbls to use
|
|
80 #
|
|
81 #
|
8
|
82 content sbl-xbl.spamhaus.org 'Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s'
|
|
83 #
|
0
|
84 dnsbl LOCAL blackholes.five-ten-sg.com 'Mail from %s rejected - local; see http://www.five-ten-sg.com/blackhole.php?%s'
|
|
85 dnsbl SPEWS blackholes.spews.org 'Mail from %s rejected - spews; see http://www.spews.org/ask.cgi?x=%s'
|
|
86 dnsbl SBL sbl-xbl.spamhaus.org 'Mail from %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s'
|
|
87
|
|
88
|
|
89 ##############################################
|
|
90 # define the (default and other) lists of dnsbls to use
|
|
91 #
|
|
92 dnsbl_list DEFAULT LOCAL SPEWS SBL
|
|
93 dnsbl_list SIMPLE SBL
|
|
94 dnsbl_list CUST1 SBL
|
|
95 dnsbl_list CUST2 SPEWS SBL
|
|
96
|
|
97
|
|
98 ##############################################
|
|
99 # define the (default and other) env_from maps
|
|
100 #
|
|
101 env_from DEFAULT spammer@example.com BLACK
|
|
102 env_from DEFAULT yahoo.com BLACK
|
|
103
|
|
104 # special list for the vp
|
|
105 env_from TEST dummy-token DEFAULT # inherit the currently defined DEFAULT env_from mapping
|
|
106 env_from TEST nai.com BLACK # the vp does not like nai
|
10
|
107 env_from TEST yahoo.com DEFAULT # override the blacklisting of yahoo
|
0
|
108 env_from TEST mother@spammyisp.com WHITE # suppresses dnsbl checking
|
|
109
|
|
110
|
|
111 ##############################################
|
|
112 # specify dnsbl_lists and env_from maps to use for specific recipients
|
|
113 #
|
|
114 env_to abuse@mydomain.com WHITE WHITE # no dnsbl, no env_from map
|
|
115 env_to sales@mydomain.com SIMPLE NULL # sbl only, no env_from map
|
|
116 env_to vp@mydomain.com DEFAULT TEST # allow mail from mom
|
|
117 env_to old-emp@mydomain.com BLACK BLACK # return no such user even from backup mx machines
|
|
118
|
10
|
119
|
0
|
120 ##############################################
|
|
121 # specify dnsbl_lists and env_from maps to use for clients domains
|
|
122 #
|
|
123 env_to mydomain.com DEFAULT DEFAULT
|
10
|
124 env_to customer1.com CUST1 CUST1 # all customer 1 domains use just sbl
|
|
125 env_to customer1a.com CUST1 CUST1
|
|
126 env_to customer1b.com CUST1 CUST1
|
|
127 env_to customer2.com CUST2 CUST2 # all customer 2 domains use spews and sbl
|
|
128 env_to customer2a.com CUST2 CUST2
|
0
|
129
|
|
130
|
|
131 ##############################################
|
|
132 # you can also include nested config files
|
|
133 # file names are single tokens, no embedded blanks
|
|
134 #
|
|
135 include dnsbl.conf # this will generate a recursive include file syslog error message
|
5
|
136
|
|
137
|
|
138 ##############################################
|
10
|
139 #
|
5
|
140 # fetch the normal dcc whitelist file and put the entries into the DEFAULT
|
|
141 # envelope-from-map. The ok/many tags in the DCC file turn into
|
|
142 # WHITE/BLACK entries when imported. The env_to entries from the DCC
|
|
143 # config turn into env_to entries here, and are therefore global to all
|
10
|
144 # domains. The assumption is that a client will only have whitelist
|
|
145 # env_to entries for their own domains, in their own dcc config file. The
|
|
146 # env_from and substitute mail_host entries turn into env_from entries in
|
|
147 # the named (DEFAULT in this case) envelope-from-map.
|
|
148 #
|
5
|
149 #
|
|
150 include_dcc DEFAULT /var/dcc/whitecommon
|
10
|
151 include_dcc CUST1 /var/dcc/whitecommon.cust1
|
|
152 include_dcc CUST2 /var/dcc/whitecommon.cust2
|