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