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