annotate xml/sample.conf @ 106:2fbeeb4ced73

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