Additional tests - didn't show any problems.
[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 rfc1413_query_timeout = 0s
9 spool_directory = DIR/spool
10 log_file_path = DIR/spool/log/%slog
11 gecos_pattern = ""
12 gecos_name = CALLER_NAME
13
14 # ----- Main settings -----
15
16 addresslist ok_senders = ok@ok.ok
17
18 domainlist local_domains = test.ex : *.test.ex
19 domainlist relay_domains = relay.test.ex
20
21 hostlist ok9_hosts = 9.9.9.9
22
23 LOG_SELECTOR
24
25 qualify_domain = test.ex
26 trusted_users = CALLER
27
28 # Use first three components of address to select ACL
29 acl_smtp_rcpt = acl_${sg{${tr{$sender_host_address}{.}{_}}}{^(.*)_.*\$}{\$1}}
30 acl_smtp_data = data_acl
31
32 # ----- ACLs -----
33
34 begin acl
35
36 data_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
46 acl_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
65 acl_5_6_7:
66 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
67 local_parts = $domain_data
68
69 acl_5_6_8:
70 accept senders = user1@domain1 : domain2 : +ok_senders
71
72 acl_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
76 acl_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
83 acl_5_6_12A:
84 accept domains = ok
85
86 acl_5_6_13:
87 accept acl = DIR/aux-fixed/TESTNUM.acl1
88
89 acl_8_8_8:
90 accept acl = acl_8_8_8
91
92 acl_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
98 acl_V4NET_0_0:
99 require verify = reverse_host_lookup
100 accept
101
102 acl_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
108 acl_20_20_20:
109 accept endpass
110 message = sender verify failure
111 verify = sender
112 message = recipient verify failure
113 verify = recipient
114
115 acl_21_21_21:
116 accept
117 verify = sender
118 verify = recipient
119
120 acl_22_22_22:
121 accept recipients = x@y
122
123 acl_23_23_23:
124 deny hosts = 23.23.23.0
125 message = sender must verify
126 !verify = sender
127 accept
128
129 acl_24_24_24:
130 warn message = X-Warn: sender didn't verify
131 condition = yes
132
133 acl_25_25_25:
134 deny message = denying domains=x
135 domains = x
136
137 acl_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
144 acl_27_27_27:
145 deny hosts = ${if eq {1}{0}{}fail}
146 accept
147
148 acl_28_28_28:
149 accept sender_domains = : okdomain
150
151 acl_29_29_29:
152 deny dnslists = test.ex/$sender_address_domain
153 accept
154
155 acl_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
163 acl_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
168 acl_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
180 acl_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
188 acl_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
196 acl_55_55_55:
197 warn message = X-rcpt-added: An added header at RCPT time
198 accept
199
200 acl_56_56_56:
201 warn message = X-Warn: $local_part
202 condition = ${substr_5:$local_part}
203 accept
204
205 acl_56_56_57:
206 accept message = accepted by condition
207 condition = ${substr_5:$local_part}
208
209 acl_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
217 acl_56_56_59:
218 accept message = ACL message for verification failure\n \
219 Original was >$acl_verify_message<
220 verify = recipient
221
222 acl_60_60_60:
223 accept !acl = DIR/aux-fixed/0023.acl2
224
225
226 # ----- Transports -----
227
228 begin transports
229
230 t1:
231 driver = appendfile
232 file = DIR/test-mail/$local_part
233 user = CALLER
234
235 t2:
236 driver = appendfile
237 file = DIR/test-mail/okbatch
238 user = CALLER
239 batch_max = 100
240 envelope_to_add
241
242 # ----- Routers -----
243
244 begin routers
245
246 r0:
247 driver = accept
248 local_parts = ^ok
249 transport = t2
250
251 r1:
252 driver = accept
253 local_parts = ^userx : ^cond-
254 transport = t1
255
256 r2:
257 driver = redirect
258 local_parts = fail
259 allow_fail
260 data = :fail: here is a fail message
261
262 # ----- Retry -----
263
264 begin retry
265
266 * * F,5d,5m
267
268 # End