1 # Exim test configuration 0023
6 host_lookup_order = bydns
7 primary_hostname = myhost.test.ex
8 spool_directory = DIR/spool
9 log_file_path = DIR/spool/log/%slog
11 gecos_name = CALLER_NAME
13 # ----- Main settings -----
17 addresslist ok_senders = ok@ok.ok
19 domainlist local_domains = test.ex : *.test.ex
20 domainlist relay_domains = relay.test.ex
22 hostlist ok9_hosts = 9.9.9.9
26 qualify_domain = test.ex
27 trusted_users = CALLER
29 # Use first three components of address to select ACL
30 acl_smtp_rcpt = acl_${sg{${tr{$sender_host_address}{.}{_}}}{^(.*)_.*\$}{\$1}}
31 acl_smtp_data = data_acl
38 warn condition = ${if def:h_x-rcpt-added:{yes}{no}}
39 message = X-data-added: Header added at data time
40 warn senders = rcpttest@test.ex
41 message = X-data-rcpt-count: $rcpt_count\n\
42 X-data-rcpt-defer-count: $rcpt_defer_count\n\
43 X-data-rcpt-fail-count: $rcpt_fail_count
44 warn message = X-message-body-size: $message_body_size
48 require domains = !nopass
50 require message = $local_part@$domain shall not pass
53 deny message = domain explicitly denied
54 log_message = DOMAIN EXPLICITLY DENIED
55 continue = this value is not used
56 domains = deny.test.ex
58 accept domains = +local_domains
60 message = $domain gets refused
61 domains = !refuse.test.ex
63 # Double to check caching
64 accept domains = +relay_domains
65 accept domains = +relay_domains
68 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
69 local_parts = $domain_data
72 accept senders = user1@domain1 : domain2 : +ok_senders
75 accept condition = ${if match{$local_part}{^x}{yes}{no}}
76 deny message = "local part of wrong type\n(quotes are literal)
79 accept hosts = 5.6.12.1
81 message = failed nested acl
89 accept acl = DIR/aux-fixed/TESTNUM.acl1
92 accept acl = acl_8_8_8
95 accept hosts = +ok9_hosts
96 deny message = don't like this host
98 accept hosts = 9.9.9.0/24
101 require verify = reverse_host_lookup
104 accept local_parts = defer_ok
105 verify = reverse_host_lookup/defer_ok
106 accept verify = reverse_host_lookup
109 deny message = host in DNS list $dnslist_domain: $dnslist_text
110 log_message = DNSLIST ($dnslist_domain: $dnslist_text)
111 dnslists = rbl.test.ex
116 message = sender verify failure
118 message = recipient verify failure
127 accept recipients = x@y
130 deny hosts = 23.23.23.0
131 message = sender must verify
136 warn message = X-Warn: sender didn't verify
140 deny message = denying domains=x
145 message = bounce messages can have only one recipient
146 condition = ${if > {$recipients_count}{0}{yes}{no}}
149 # Force host list expansion failure
151 deny hosts = ${if eq {1}{0}{}fail}
155 accept sender_domains = : okdomain
158 deny dnslists = test.ex/$sender_address_domain
162 deny message = domain=$dnslist_domain\n\
163 value=$dnslist_value\n\
164 matched=$dnslist_matched\n\
166 dnslists = test.ex=V4NET.0.0.1,127.0.0.2/$sender_address_domain
169 # This one tests what happens when a lookup key gets too long
171 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 # Settings of $domain and $local_part
176 warn message = Start: domain=$domain local_part=$local_part
178 warn local_parts = userx-vs
179 message = Vs: domain=$domain local_part=$local_part
182 warn message = Vr: domain=$domain local_part=$local_part
189 message = sender verify failure
190 verify = sender/no_details
191 message = recipient verify failure
194 # Incomplete DNS lookups
196 warn dnslists = test.again.dns
197 warn dnslists = +include_unknown : test.again.dns
198 warn dnslists = +exclude_unknown : test.again.dns
199 warn dnslists = +defer_unknown : test.again.dns
202 # Adding header at RCPT time and testing at DATA time
204 warn message = X-rcpt-added: An added header at RCPT time
208 warn message = X-Warn: $local_part
209 condition = ${substr_5:$local_part}
213 accept message = accepted by condition
214 condition = ${substr_5:$local_part}
217 warn message = xx: rcpt_count = $rcpt_count\n \
218 rcpt_defer_count = $rcpt_defer_count\n \
219 rcpt_fail_count = $rcpt_fail_count\n \
220 recipients_count = $recipients_count\n \
221 local_part = $local_part
222 accept local_parts = ^ok
225 accept message = ACL message for verification failure\n \
226 Original was >$acl_verify_message<
230 accept !acl = DIR/aux-fixed/0023.acl2
233 # ----- Transports -----
239 file = DIR/test-mail/$local_part
244 file = DIR/test-mail/okbatch
249 # ----- Routers -----
260 local_parts = ^userx : ^cond-
267 data = :fail: here is a fail message