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