comparison xml/sample.conf @ 80:d554e41f2886

start coding on new config syntax
author carl
date Sat, 16 Jul 2005 20:25:35 -0700
parents 81f1e400e8ab
children 7e4a90e5f213
comparison
equal deleted inserted replaced
79:091d3fe3db46 80:d554e41f2886
1 # $Id$ 1 # $Id$
2 # 2 #
3 3
4 # partial bnf description of this configuration language 4 # Partial bnf description of this configuration language. Any sequence of
5 # three tokens ("include" FILENAME ";") are replaced by the content of the
6 # specified file.
7 #
5 # 8 #
6 # CONFIG = {CONTEXT ";"}+ 9 # CONFIG = {CONTEXT ";"}+
7 # CONTEXT = "context" NAME "{" {STATEMENT}+ "}" 10 # CONTEXT = "context" NAME "{" {STATEMENT}+ "}"
8 # STATEMENT = (DNSBL | DNSBLLIST | CONTENT | ENV-TO | CONTEXT | ENV-FROM) ";" 11 # STATEMENT = (DNSBL | DNSBLLIST | CONTENT | ENV-TO | CONTEXT | ENV-FROM) ";"
9 12
25 28
26 # ENV-TO = "env_to" "{" {(TO-ADDR | DCC-TO)}+ "}" 29 # ENV-TO = "env_to" "{" {(TO-ADDR | DCC-TO)}+ "}"
27 # TO-ADDR = ADDRESS [";"] 30 # TO-ADDR = ADDRESS [";"]
28 # DCC-TO = "dcc_to" ("ok" | "many") "{" DCCINCLUDEFILE "}" ";" 31 # DCC-TO = "dcc_to" ("ok" | "many") "{" DCCINCLUDEFILE "}" ";"
29 32
30 # ENV_FROM = "env_from" DEFAULT "{" {(FROM-ADDR | DCC-FROM)}+ "}" 33 # ENV_FROM = "env_from" [DEFAULT] "{" {(FROM-ADDR | DCC-FROM)}+ "}"
31 # FROM-ADDR = ADDRESS VALUE [";"] 34 # FROM-ADDR = ADDRESS VALUE [";"]
32 # DCC-FROM = "dcc_from" "{" DCCINCLUDEFILE "}" ";" 35 # DCC-FROM = "dcc_from" "{" DCCINCLUDEFILE "}" ";"
33 # DEFAULT = ("white" | "black" | "unknown" | "inherit" | "") 36 # DEFAULT = ("white" | "black" | "unknown" | "inherit" | "")
34 # ADDRESS = (USER@ | DOMAIN | USER@DOMAIN) 37 # ADDRESS = (USER@ | DOMAIN | USER@DOMAIN)
35 # VALUE = ("white" | "black" | "unknown" | CHILD-CONTEXT-NAME 38 # VALUE = ("white" | "black" | "unknown" | CHILD-CONTEXT-NAME
63 }; 66 };
64 67
65 context whitelist { 68 context whitelist {
66 content off {}; 69 content off {};
67 env_to { 70 env_to {
68 # dcc_to ok { include "/var/dcc/whitecommon"; }; 71 # dcc_to ok { include "/var/dcc/whitecommon"; }; # copy the dcc OK values (env_to) into this context
69 }; 72 };
70 env_from white {}; # white forces all unmatched from addresses (everyone in this case) to be whitelisted 73 env_from white {}; # white forces all unmatched from addresses (everyone in this case) to be whitelisted
71 # so all mail TO these env_to addresses is accepted 74 # so all mail TO these env_to addresses is accepted
72 }; 75 };
73 76
89 }; 92 };
90 }; 93 };
91 94
92 context blacklist { 95 context blacklist {
93 env_to { 96 env_to {
94 dcc_to many { include "/var/dcc/whitecommon"; }; 97 dcc_to many { include "/var/dcc/whitecommon"; }; # copy the dcc MANY values (env_to) into this context
95 old-employee@mydomain.com; 98 old-employee@mydomain.com;
96 }; 99 };
97 env_from black {}; # black forces all unmatched from addresses (everyone in this case) to be blacklisted 100 env_from black {}; # black forces all unmatched from addresses (everyone in this case) to be blacklisted
98 # so all mail TO these env_to addresses is rejected 101 # so all mail TO these env_to addresses is rejected
99 }; 102 };
126 second@another.com unknown; 129 second@another.com unknown;
127 yahoo.com inherit; # delegate to the parent 130 yahoo.com inherit; # delegate to the parent
128 }; 131 };
129 }; 132 };
130 133
131 env_from inherit { 134 env_from { # default value of the default is inherit
132 yahoo.com black; # no mail from yahoo 135 yahoo.com black; # no mail from yahoo
133 first@yahoo.com unknown; # except this one 136 first@yahoo.com unknown; # except this one
134 }; 137 };
135 }; 138 };
136 139
142 customer2b.com; 145 customer2b.com;
143 }; 146 };
144 }; 147 };
145 148
146 env_from unknown { 149 env_from unknown {
147 dcc_from { include "/var/dcc/whitecommon"; }; # use the dcc whitecommon list ok/many values to white/black list envelope from values here 150 dcc_from { include "/var/dcc/whitecommon"; }; # copy the dcc OK/MANY values (env_from, substitute mail_host) into this context
148 abuse@ abuse; # replies to abuse reports use the abuse context 151 abuse@ abuse; # replies to abuse reports use the abuse context
149 yahoo.com black; # don't take mail from yahoo 152 yahoo.com black; # don't take mail from yahoo
150 spammer@example.com black; 153 spammer@example.com black;
151 }; 154 };
152 }; 155 };