Use compressed form of ipv6 in $sender_host_address under -bh. Bug 3027
[exim.git] / test / confs / 0023
1 # Exim test configuration 0023
2
3 LOG_SELECTOR=
4
5 .include DIR/aux-var/std_conf_prefix
6
7 primary_hostname = myhost.test.ex
8
9 # ----- Main settings -----
10
11 disable_ipv6 = true
12
13 addresslist ok_senders = ok@ok.ok
14
15 domainlist local_domains = test.ex : *.test.ex
16 domainlist relay_domains = relay.test.ex
17
18 hostlist ok9_hosts = 9.9.9.9
19
20 LOG_SELECTOR
21
22 qualify_domain = test.ex
23 trusted_users = CALLER
24
25 # Use first three components of address to select ACL
26 acl_smtp_rcpt = acl_${sg{${tr{$sender_host_address}{.}{_}}}{^(.*)_.*\$}{\$1}}
27 acl_smtp_data = data_acl
28
29 # ----- ACLs -----
30
31 begin acl
32
33 data_acl:
34   warn    condition = ${if def:h_x-rcpt-added:{yes}{no}}
35           message   = X-data-added: Header added at data time
36   warn    senders   = rcpttest@test.ex
37           message   = X-data-rcpt-count: $rcpt_count\n\
38                       X-data-rcpt-defer-count: $rcpt_defer_count\n\
39                       X-data-rcpt-fail-count: $rcpt_fail_count
40   warn    message   = X-message-body-size: $message_body_size
41   accept
42
43 acl_1_2_3:
44   require domains = !nopass
45
46   require message = $local_part@$domain shall not pass
47           domains = !wontpass
48
49   deny    message = domain explicitly denied
50           log_message = DOMAIN EXPLICITLY DENIED
51           continue = this value is not used
52           domains = deny.test.ex
53
54   accept  domains = +local_domains
55           endpass
56           message = $domain gets refused
57           domains = !refuse.test.ex
58
59   # Double to check caching
60   accept  domains = +relay_domains
61   accept  domains = +relay_domains
62
63 acl_5_6_7:
64   accept  domains = lsearch;DIR/aux-fixed/TESTNUM.doms
65           local_parts = $domain_data
66
67 acl_5_6_8:
68   accept  senders = user1@domain1 : domain2 : +ok_senders
69
70 acl_5_6_11:
71   accept  condition = ${if match{$local_part}{^x}{yes}{no}}
72   deny    message = "local part of wrong type\n(quotes are literal)
73
74 acl_5_6_12:
75   accept  hosts = 5.6.12.1
76           endpass
77           message = failed nested acl
78           acl = acl_5_6_12A
79   accept
80
81 acl_5_6_12A:
82   accept  domains = ok
83
84 acl_5_6_13:
85   accept  acl = DIR/aux-fixed/TESTNUM.acl1
86
87 acl_8_8_8:
88   accept  acl = acl_8_8_8
89
90 acl_9_9_9:
91   accept  hosts = +ok9_hosts
92   deny    message = don't like this host
93           hosts = 9.9.9.0/26
94   accept  hosts = 9.9.9.0/24
95
96 acl_V4NET_0_0:
97   require verify = reverse_host_lookup
98   accept
99 acl_V4NET_99_99:
100   accept  local_parts = defer_ok
101           verify = reverse_host_lookup/defer_ok
102   accept  verify = reverse_host_lookup
103
104 acl_V4NET_11_12:
105   deny    message = host in DNS list $dnslist_domain: $dnslist_text
106           log_message = DNSLIST ($dnslist_domain: $dnslist_text)
107           dnslists = rbl.test.ex
108   accept
109
110 acl_20_20_20:
111   accept  endpass
112           message = sender verify failure
113           verify = sender
114           message = recipient verify failure
115           verify = recipient
116
117 acl_21_21_21:
118   accept
119           verify = sender
120           verify = recipient
121
122 acl_22_22_22:
123   accept  recipients = x@y
124
125 acl_23_23_23:
126   deny    hosts = 23.23.23.0
127           message = sender must verify
128          !verify = sender
129   accept
130
131 acl_24_24_24:
132   warn    message = X-Warn: sender didn't verify
133           condition = yes
134
135 acl_25_25_25:
136   deny    message = denying domains=x
137           domains = x
138
139 acl_26_26_26:
140   deny    senders = :
141           message = bounce messages can have only one recipient
142           condition = ${if > {$recipients_count}{0}{yes}{no}}
143   accept
144
145 # Force host list expansion failure
146 acl_27_27_27:
147   deny    hosts = ${if eq {1}{0}{}fail}
148   accept
149
150 acl_28_28_28:
151   accept  sender_domains = : okdomain
152
153 acl_29_29_29:
154   deny    dnslists = test.ex/$sender_address_domain
155   accept
156
157 acl_30_30_30:
158   deny    message  = domain=$dnslist_domain\n\
159                      value=$dnslist_value\n\
160                      matched=$dnslist_matched\n\
161                      text="$dnslist_text"
162           dnslists = test.ex=V4NET.0.0.1,127.0.0.2/$sender_address_domain
163   accept
164
165 # This one tests what happens when a lookup key gets too long
166 acl_31_31_31:
167   deny    dnslists = test.ex/$sender_address_domain+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+extra+END
168   accept
169
170 # Settings of $domain and $local_part
171 acl_32_32_32:
172   warn    message = Start: domain=$domain local_part=$local_part
173
174   warn    local_parts = userx-vs
175           message = Vs: domain=$domain local_part=$local_part
176           verify = sender
177
178   warn    message = Vr: domain=$domain local_part=$local_part
179           verify = recipient
180
181   accept
182
183 acl_33_33_33:
184   accept  endpass
185           message = sender verify failure
186           verify = sender/no_details
187           message = recipient verify failure
188           verify = recipient
189
190 # Incomplete DNS lookups
191 acl_44_44_44:
192   warn    dnslists = test.again.dns
193   warn    dnslists = +include_unknown : test.again.dns
194   warn    dnslists = +exclude_unknown : test.again.dns
195   warn    dnslists = +defer_unknown : test.again.dns
196   accept
197
198 # Adding header at RCPT time and testing at DATA time
199 acl_55_55_55:
200   warn    message = X-rcpt-added: An added header at RCPT time
201   accept
202
203 acl_56_56_56:
204   warn    message = X-Warn: $local_part
205           condition = ${substr_5:$local_part}
206   accept
207
208 acl_56_56_57:
209   accept  message = accepted by condition
210           condition = ${substr_5:$local_part}
211
212 acl_56_56_58:
213   warn    message = xx: rcpt_count = $rcpt_count\n    \
214                         rcpt_defer_count = $rcpt_defer_count\n    \
215                         rcpt_fail_count  = $rcpt_fail_count\n    \
216                         recipients_count = $recipients_count\n    \
217                         local_part = $local_part
218   accept  local_parts = ^ok
219
220 acl_56_56_59:
221   accept  message = ACL message for verification failure\n \
222                     Original was >$acl_verify_message<
223           verify  = recipient
224
225 acl_60_60_60:
226   accept !acl = DIR/aux-fixed/0023.acl2
227
228
229 # ----- Transports -----
230
231 begin transports
232
233 t1:
234   driver = appendfile
235   file = DIR/test-mail/$local_part
236   create_file = DIR/test-mail
237   user = CALLER
238
239 t2:
240   driver = appendfile
241   file = DIR/test-mail/okbatch
242   user = CALLER
243   batch_max = 100
244   envelope_to_add
245
246 # ----- Routers -----
247
248 begin routers
249
250 r0:
251   driver = accept
252   local_parts = ^ok
253   transport = t2
254
255 r1:
256   driver = accept
257   local_parts = ^userx : ^cond-
258   transport = t1
259
260 r2:
261   driver = redirect
262   local_parts = fail
263   allow_fail
264   data = :fail: here is a fail message
265
266 # ----- Retry -----
267
268 begin retry
269
270 *                *   F,5d,5m
271
272 # End