annotate dnsbl.conf @ 269:6d2a11f0ae41

Added tag stable-6-0-34 for changeset f941563c2a95
author Carl Byington <carl@five-ten-sg.com>
date Wed, 22 May 2013 11:34:37 -0700
parents f941563c2a95
children f92f24950bd3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
1 context main-default {
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
2 // outbound dnsbl filtering to catch our own customers that end up on the sbl
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
3 dnsbl sbl sbl-xbl.spamhaus.org "Mail from %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
174
da0c41b9f672 don't whitelist addresses with embedded spaces
carl
parents: 172
diff changeset
4 dnsbl_list sbl;
127
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
5
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
6 // outbound content filtering to prevent our own customers from sending spam
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
7 content on {
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
8 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
9 uribl multi.surbl.org "Mail containing %s rejected - surbl; see http://www.rulesemporium.com/cgi-bin/uribl.cgi?bl0=1&domain0=%s";
259
be939802c64e add recipient rate limits by email from address or domain
Carl Byington <carl@five-ten-sg.com>
parents: 255
diff changeset
10 #uribl multi.uribl.com "Mail containing %s rejected - uribl; see http://l.uribl.com/?d=%s";
127
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
11 ignore { include "hosts-ignore.conf"; };
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
12 tld { include "tld.conf"; };
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
13 cctld { include "cctld.conf"; };
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
14 html_tags { include "html-tags.conf"; };
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
15 html_limit on 20 "Mail containing excessive bad html tags rejected";
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
16 html_limit off;
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
17 host_limit on 20 "Mail containing excessive host names rejected";
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
18 host_limit soft 20;
178
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
19 spamassassin 4;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
20 require_match yes;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
21 dcc_greylist yes;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
22 dcc_bulk_threshold 50;
127
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
23 };
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
24
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
25 // backscatter prevention - don't send bounces for mail that we accepted but could not forward
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
26 // we only send bounces to our own customers
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
27 env_from unknown {
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
28 "<>" black;
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
29 };
136
f4746d8a12a3 add smtp auth rate limits
carl
parents: 127
diff changeset
30
259
be939802c64e add recipient rate limits by email from address or domain
Carl Byington <carl@five-ten-sg.com>
parents: 255
diff changeset
31 // hourly recipient rate limit by smtp auth client id,
be939802c64e add recipient rate limits by email from address or domain
Carl Byington <carl@five-ten-sg.com>
parents: 255
diff changeset
32 // or unauthenticated mail from address
255
d6d5c50b9278 Allow dnswl_list and dnsbl_list to be empty, to override lists specified in the ancestor contexts. Add daily recipient limits as a multiple of the hourly limits.
Carl Byington <carl@five-ten-sg.com>
parents: 249
diff changeset
33 // default hourly limit is 30
d6d5c50b9278 Allow dnswl_list and dnsbl_list to be empty, to override lists specified in the ancestor contexts. Add daily recipient limits as a multiple of the hourly limits.
Carl Byington <carl@five-ten-sg.com>
parents: 249
diff changeset
34 // daily limits are 4 times the hourly limit
d6d5c50b9278 Allow dnswl_list and dnsbl_list to be empty, to override lists specified in the ancestor contexts. Add daily recipient limits as a multiple of the hourly limits.
Carl Byington <carl@five-ten-sg.com>
parents: 249
diff changeset
35 rate_limit 30 4 { // default
144
31ff00ea6bfb allow parent/child to share a fully qualified env_to address
carl
parents: 140
diff changeset
36 #fred 100; // override default limits
31ff00ea6bfb allow parent/child to share a fully qualified env_to address
carl
parents: 140
diff changeset
37 #joe 10; // ""
263
e118fd2c6af0 fix unauthenticated rate limit bug for empty mail from; move unauthenticate rate limit checks after spam filtering
Carl Byington <carl@five-ten-sg.com>
parents: 259
diff changeset
38 #"sam@somedomain.tld" 500;
e118fd2c6af0 fix unauthenticated rate limit bug for empty mail from; move unauthenticate rate limit checks after spam filtering
Carl Byington <carl@five-ten-sg.com>
parents: 259
diff changeset
39 #"@otherdomain.tld" 100;
136
f4746d8a12a3 add smtp auth rate limits
carl
parents: 127
diff changeset
40 };
127
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
41 };
2b1a4701e856 sendmail no longer guarantees <> wrapper on envelopes
carl
parents: 122
diff changeset
42
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
43 context main {
136
f4746d8a12a3 add smtp auth rate limits
carl
parents: 127
diff changeset
44 dnsbl localp partial.blackholes.five-ten-sg.com "Mail from %s rejected - local; see http://www.five-ten-sg.com/blackhole.php?%s";
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
45 dnsbl local blackholes.five-ten-sg.com "Mail from %s rejected - local; see http://www.five-ten-sg.com/blackhole.php?%s";
174
da0c41b9f672 don't whitelist addresses with embedded spaces
carl
parents: 172
diff changeset
46 dnsbl sbl zen.spamhaus.org "Mail from %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
47 dnsbl xbl xbl.spamhaus.org "Mail from %s rejected - xbl; see http://www.spamhaus.org/query/bl?ip=%s";
249
15bf4f68a0b2 Add dnswl support
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
48 dnswl dnswl.org list.dnswl.org 2;
171
8deb51871b3d fix pre/post scripts in rpm spec file
carl
parents: 168
diff changeset
49 dnsbl_list local sbl;
249
15bf4f68a0b2 Add dnswl support
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
50 dnswl_list dnswl.org;
268
f941563c2a95 Add require_rdns checking
Carl Byington <carl@five-ten-sg.com>
parents: 263
diff changeset
51 require_rdns yes;
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
52
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
53 content on {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
54 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
122
e8971c595845 fix typo in multi.surbl.org name
carl
parents: 119
diff changeset
55 uribl multi.surbl.org "Mail containing %s rejected - surbl; see http://www.rulesemporium.com/cgi-bin/uribl.cgi?bl0=1&domain0=%s";
259
be939802c64e add recipient rate limits by email from address or domain
Carl Byington <carl@five-ten-sg.com>
parents: 255
diff changeset
56 #uribl multi.uribl.com "Mail containing %s rejected - uribl; see http://l.uribl.com/?d=%s";
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
57 ignore { include "hosts-ignore.conf"; };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
58 tld { include "tld.conf"; };
119
d9d2f8699621 uribl patch from Jeff Evans <jeffe@tricab.com>
carl
parents: 117
diff changeset
59 cctld { include "cctld.conf"; };
d9d2f8699621 uribl patch from Jeff Evans <jeffe@tricab.com>
carl
parents: 117
diff changeset
60 html_tags { include "html-tags.conf"; };
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
61 html_limit off;
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
62 host_limit soft 20;
178
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
63 spamassassin 5;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
64 require_match yes;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
65 dcc_greylist yes;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
66 dcc_bulk_threshold 20;
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
67 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
68
216
784030ac71f1 Never whitelist self addressed mail. Changes for Fedora 10 and const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 179
diff changeset
69 generic "^dsl.static.*ttnet.net.tr$|(^|[x.-])(ppp|h|host)?([0-9]{1,3}[x.-](Red-|dynamic[x.-])?){4}"
168
6bac960af6b4 add generic reverse dns filtering regex
carl
parents: 167
diff changeset
70 "your mail server %s seems to have a generic name";
6bac960af6b4 add generic reverse dns filtering regex
carl
parents: 167
diff changeset
71
233
5c3e9bf45bb5 Add whitelisting by regex expression filtering.
Carl Byington <carl@five-ten-sg.com>
parents: 216
diff changeset
72 white_regex "=example.com=user@yourhostingaccount.com$";
5c3e9bf45bb5 Add whitelisting by regex expression filtering.
Carl Byington <carl@five-ten-sg.com>
parents: 216
diff changeset
73
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
74 env_to {
100
63e8633abc34 allow empty env_to at global context to remove all restrictions on child contexts
carl
parents: 94
diff changeset
75 # !! replace this with your domain names
63e8633abc34 allow empty env_to at global context to remove all restrictions on child contexts
carl
parents: 94
diff changeset
76 # child contexts are not allowed to specify recipient addresses outside these domains
179
8b86a894514d embedded dcc filtering
carl
parents: 178
diff changeset
77 # if this is a backup-mx, you need to include here domains for which you relay to the primary mx
174
da0c41b9f672 don't whitelist addresses with embedded spaces
carl
parents: 172
diff changeset
78 include "/etc/mail/local-host-names";
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
79 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
80
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
81 context whitelist {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
82 content off {};
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
83 env_to {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
84 # dcc_to ok { include "/var/dcc/whitecommon"; };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
85 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
86 env_from white {}; # white forces all unmatched from addresses (everyone in this case) to be whitelisted
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
87 # so all mail TO these env_to addresses is accepted
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
88 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
89
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
90 context abuse {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
91 dnsbl_list xbl;
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
92 content off {};
174
da0c41b9f672 don't whitelist addresses with embedded spaces
carl
parents: 172
diff changeset
93 generic "^$ " " "; # regex cannot match, to disable generic rdns rejects
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
94 env_to {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
95 abuse@ # no content filtering on abuse reports
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
96 postmaster@ # ""
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
97 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
98 env_from unknown {}; # ignore all parent white/black listing
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
99 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
100
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
101 context minimal {
171
8deb51871b3d fix pre/post scripts in rpm spec file
carl
parents: 168
diff changeset
102 dnsbl_list sbl;
178
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
103 content on {
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
104 spamassassin 10;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
105 dcc_bulk_threshold many;
d6531c702be3 embedded dcc filtering
carl
parents: 175
diff changeset
106 };
171
8deb51871b3d fix pre/post scripts in rpm spec file
carl
parents: 168
diff changeset
107 generic "^$ " " "; # regex cannot match, to disable generic rdns rejects
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
108 env_to {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
109 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
110 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
111
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
112 context blacklist {
255
d6d5c50b9278 Allow dnswl_list and dnsbl_list to be empty, to override lists specified in the ancestor contexts. Add daily recipient limits as a multiple of the hourly limits.
Carl Byington <carl@five-ten-sg.com>
parents: 249
diff changeset
113 dnsbl_list ;
d6d5c50b9278 Allow dnswl_list and dnsbl_list to be empty, to override lists specified in the ancestor contexts. Add daily recipient limits as a multiple of the hourly limits.
Carl Byington <carl@five-ten-sg.com>
parents: 249
diff changeset
114 dnswl_list ;
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
115 env_to {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
116 # dcc_to many { include "/var/dcc/whitecommon"; };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
117 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
118 env_from black {}; # black forces all unmatched from addresses (everyone in this case) to be blacklisted
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
119 # so all mail TO these env_to addresses is rejected
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
120 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
121
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
122 env_from unknown {
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
123 abuse@ abuse; # replies to abuse reports use the abuse context
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
124 # dcc_from { include "/var/dcc/whitecommon"; };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
125 };
153
8d7c439bb6fa add auto whitelisting
carl
parents: 144
diff changeset
126
167
9b129ed78d7d actually use spamassassin result, allow build without spam assassin, only call it if some recipient needs it.
carl
parents: 165
diff changeset
127 autowhite 90 "autowhite/my-auto-whitelist";
9b129ed78d7d actually use spamassassin result, allow build without spam assassin, only call it if some recipient needs it.
carl
parents: 165
diff changeset
128 # install should create /etc/dnsbl/autowhite writable by userid dnsbl
94
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
129 };
e107ade3b1c0 fix dos line terminators
carl
parents: 92
diff changeset
130