Logging: support +outgoing_port on defer lines and per-host error lines
[exim.git] / test / confs / 0023
1 # Exim test configuration 0023
2
3 LOG_SELECTOR=
4
5 exim_path = EXIM_PATH
6 host_lookup_order = bydns
7 primary_hostname = myhost.test.ex
8 spool_directory = DIR/spool
9 log_file_path = DIR/spool/log/%slog
10 gecos_pattern = ""
11 gecos_name = CALLER_NAME
12 tls_advertise_hosts =
13
14 # ----- Main settings -----
15
16 disable_ipv6 = true
17
18 addresslist ok_senders = ok@ok.ok
19
20 domainlist local_domains = test.ex : *.test.ex
21 domainlist relay_domains = relay.test.ex
22
23 hostlist ok9_hosts = 9.9.9.9
24
25 LOG_SELECTOR
26
27 qualify_domain = test.ex
28 trusted_users = CALLER
29
30 # Use first three components of address to select ACL
31 acl_smtp_rcpt = acl_${sg{${tr{$sender_host_address}{.}{_}}}{^(.*)_.*\$}{\$1}}
32 acl_smtp_data = data_acl
33
34 # ----- ACLs -----
35
36 begin acl
37
38 data_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
48 acl_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
56 continue = this value is not used
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
68 acl_5_6_7:
69 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
70 local_parts = $domain_data
71
72 acl_5_6_8:
73 accept senders = user1@domain1 : domain2 : +ok_senders
74
75 acl_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
79 acl_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
86 acl_5_6_12A:
87 accept domains = ok
88
89 acl_5_6_13:
90 accept acl = DIR/aux-fixed/TESTNUM.acl1
91
92 acl_8_8_8:
93 accept acl = acl_8_8_8
94
95 acl_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
101 acl_V4NET_0_0:
102 require verify = reverse_host_lookup
103 accept
104 acl_V4NET_99_99:
105 accept local_parts = defer_ok
106 verify = reverse_host_lookup/defer_ok
107 accept verify = reverse_host_lookup
108
109 acl_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
115 acl_20_20_20:
116 accept endpass
117 message = sender verify failure
118 verify = sender
119 message = recipient verify failure
120 verify = recipient
121
122 acl_21_21_21:
123 accept
124 verify = sender
125 verify = recipient
126
127 acl_22_22_22:
128 accept recipients = x@y
129
130 acl_23_23_23:
131 deny hosts = 23.23.23.0
132 message = sender must verify
133 !verify = sender
134 accept
135
136 acl_24_24_24:
137 warn message = X-Warn: sender didn't verify
138 condition = yes
139
140 acl_25_25_25:
141 deny message = denying domains=x
142 domains = x
143
144 acl_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
151 acl_27_27_27:
152 deny hosts = ${if eq {1}{0}{}fail}
153 accept
154
155 acl_28_28_28:
156 accept sender_domains = : okdomain
157
158 acl_29_29_29:
159 deny dnslists = test.ex/$sender_address_domain
160 accept
161
162 acl_30_30_30:
163 deny message = domain=$dnslist_domain\n\
164 value=$dnslist_value\n\
165 matched=$dnslist_matched\n\
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
171 acl_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
176 acl_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
188 acl_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
196 acl_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
204 acl_55_55_55:
205 warn message = X-rcpt-added: An added header at RCPT time
206 accept
207
208 acl_56_56_56:
209 warn message = X-Warn: $local_part
210 condition = ${substr_5:$local_part}
211 accept
212
213 acl_56_56_57:
214 accept message = accepted by condition
215 condition = ${substr_5:$local_part}
216
217 acl_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
225 acl_56_56_59:
226 accept message = ACL message for verification failure\n \
227 Original was >$acl_verify_message<
228 verify = recipient
229
230 acl_60_60_60:
231 accept !acl = DIR/aux-fixed/0023.acl2
232
233
234 # ----- Transports -----
235
236 begin transports
237
238 t1:
239 driver = appendfile
240 file = DIR/test-mail/$local_part
241 user = CALLER
242
243 t2:
244 driver = appendfile
245 file = DIR/test-mail/okbatch
246 user = CALLER
247 batch_max = 100
248 envelope_to_add
249
250 # ----- Routers -----
251
252 begin routers
253
254 r0:
255 driver = accept
256 local_parts = ^ok
257 transport = t2
258
259 r1:
260 driver = accept
261 local_parts = ^userx : ^cond-
262 transport = t1
263
264 r2:
265 driver = redirect
266 local_parts = fail
267 allow_fail
268 data = :fail: here is a fail message
269
270 # ----- Retry -----
271
272 begin retry
273
274 * * F,5d,5m
275
276 # End