annotate xml/sample.conf @ 89:946fc1bcfb2c stable-5-3

don't load null config pointer, keep the old one
author carl
date Sun, 07 Aug 2005 11:26:37 -0700
parents 7e4a90e5f213
children 505e77188317
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
89
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
1 # $Id$
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
2 #
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
3
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
4 # Partial bnf description of this configuration language. Any sequence of
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
5 # three tokens ("include" FILENAME ";") are replaced by the content of the
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
6 # specified file.
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
7 #
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
8 #
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
9 # CONFIG = {CONTEXT ";"}+
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
10 # CONTEXT = "context" NAME "{" {STATEMENT}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
11 # STATEMENT = (DNSBL | DNSBLLIST | CONTENT | ENV-TO | CONTEXT | ENV-FROM) ";"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
12
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
13 # DNSBL = "dnsbl" NAME DNSPREFIX ERROR-MSG
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
14
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
15 # DNSBLLIST = "dnsbl_list" {NAME}+
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
16
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
17 # CONTENT = "content" ("on" | "off") "{" {CONTENT-STATEMENT}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
18 # CONTENT-STATEMENT = (FILTER | IGNORE | TLD | HTML-TAGS | HTML-LIMIT | HOST-LIMIT) ";"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
19 # FILTER = "filter" DNSPREFIX ERROR-MSG
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
20 # IGNORE = "ignore" "{" {HOSTNAME [";"]}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
21 # TLD = "tld" "{" {TLD [";"]}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
22 # HTML-TAGS = "html_tags" "{" {HTMLTAG [";"]}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
23 # ERROR-MSG = string containing exactly two %s replacement tokens for the client ip address
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
24
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
25 # HTML-LIMIT = "html_limit" ("on" INTEGER ERROR-MSG | "off")
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
26
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
27 # HOST-LIMIT = "host_limit" ("on" INTEGER ERROR-MSG | "off" | "soft" INTEGER)
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
28
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
29 # ENV-TO = "env_to" "{" {(TO-ADDR | DCC-TO)}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
30 # TO-ADDR = ADDRESS [";"]
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
31 # DCC-TO = "dcc_to" ("ok" | "many") "{" DCCINCLUDEFILE "}" ";"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
32
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
33 # ENV_FROM = "env_from" [DEFAULT] "{" {(FROM-ADDR | DCC-FROM)}+ "}"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
34 # FROM-ADDR = ADDRESS VALUE [";"]
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
35 # DCC-FROM = "dcc_from" "{" DCCINCLUDEFILE "}" ";"
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
36 # DEFAULT = ("white" | "black" | "unknown" | "inherit" | "")
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
37 # ADDRESS = (USER@ | DOMAIN | USER@DOMAIN)
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
38 # VALUE = ("white" | "black" | "unknown" | CHILD-CONTEXT-NAME)
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
39
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
40
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
41 context sample {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
42 dnsbl local blackholes.five-ten-sg.com "Mail from %s rejected - local; see http://www.five-ten-sg.com/blackhole.php?%s";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
43 dnsbl spews blackholes.spews.org "Mail from %s rejected - spews; see http://www.spews.org/ask.cgi?x=%s";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
44 dnsbl sbl sbl-xbl.spamhaus.org "Mail from %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
45 dnsbl xbl xbl.spamhaus.org "Mail from %s rejected - xbl; see http://www.spamhaus.org/query/bl?ip=%s";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
46 dnsbl_list local sbl;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
47
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
48 content on {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
49 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
50 ignore { include "hosts-ignore.conf"; };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
51 tld { include "tld.conf"; };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
52 html_tags { include "html-tags.conf"; };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
53 html_limit on 20 "Mail containing excessive bad html tags rejected";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
54 html_limit off;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
55 host_limit on 20 "Mail containing excessive host names rejected";
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
56 host_limit soft 20;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
57 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
58
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
59 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
60 mydomain.com; # child contexts are not allowed to specify recipient addresses outside these domains
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
61 customer1.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
62 customer1a.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
63 customer1b.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
64 customer2.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
65 customer2a.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
66 customer2b.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
67 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
68
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
69 context whitelist {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
70 content off {};
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
71 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
72 # dcc_to ok { include "/var/dcc/whitecommon"; }; # copy the dcc OK values (env_to) into this context
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
73 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
74 env_from white {}; # white forces all unmatched from addresses (everyone in this case) to be whitelisted
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
75 # so all mail TO these env_to addresses is accepted
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
76 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
77
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
78 context abuse {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
79 dnsbl_list xbl;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
80 content off {};
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
81 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
82 abuse@; # no content filtering on abuse reports
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
83 postmaster@; # ""
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
84 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
85 env_from unknown {}; # ignore all parent white/black listing
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
86 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
87
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
88 context minimal {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
89 dnsbl_list sbl;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
90 content on {};
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
91 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
92 sales@mydomain.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
93 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
94 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
95
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
96 context blacklist {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
97 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
98 dcc_to many { include "/var/dcc/whitecommon"; }; # copy the dcc MANY values (env_to) into this context
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
99 old-employee@mydomain.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
100 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
101 env_from black {}; # black forces all unmatched from addresses (everyone in this case) to be blacklisted
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
102 # so all mail TO these env_to addresses is rejected
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
103 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
104
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
105 context vp { # special context for the vp
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
106 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
107 vp@mydomain.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
108 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
109 env_from inherit {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
110 nai.com black; # the vp does not like nai
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
111 yahoo.com unknown; # override parent context blacklisting
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
112 mother@spammyisp.com white; # suppress dnsbl checking
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
113 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
114 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
115
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
116 context customer1 {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
117 dnsbl_list sbl;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
118 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
119 customer1.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
120 customer1a.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
121 customer1b.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
122 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
123
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
124 context customer1a {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
125 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
126 customer1a.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
127 }
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
128 env_from black { # blacklist everything
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
129 first@acceptable.com unknown; # except these specific envelope senders
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
130 second@another.com unknown;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
131 yahoo.com inherit; # delegate to the parent
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
132 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
133 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
134
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
135 env_from { # default value of the default is inherit
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
136 yahoo.com black; # no mail from yahoo
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
137 first@yahoo.com unknown; # except this one
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
138 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
139 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
140
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
141 context customer2 {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
142 dnsbl_list sbl spews;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
143 env_to {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
144 customer2.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
145 customer2a.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
146 customer2b.com;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
147 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
148 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
149
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
150 env_from unknown {
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
151 dcc_from { include "/var/dcc/whitecommon"; }; # copy the dcc OK/MANY values (env_from, substitute mail_host) into this context
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
152 abuse@ abuse; # replies to abuse reports use the abuse context
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
153 yahoo.com black; # don't take mail from yahoo
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
154 spammer@example.com black;
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
155 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
156 };
946fc1bcfb2c don't load null config pointer, keep the old one
carl
parents: 85
diff changeset
157