1 # Exim test configuration 0023
5 .include DIR/aux-var/std_conf_prefix
7 primary_hostname = myhost.test.ex
9 # ----- Main settings -----
13 addresslist ok_senders = ok@ok.ok
15 domainlist local_domains = test.ex : *.test.ex
16 domainlist relay_domains = relay.test.ex
18 hostlist ok9_hosts = 9.9.9.9
22 qualify_domain = test.ex
23 trusted_users = CALLER
25 # Use first three components of address to select ACL
26 acl_smtp_rcpt = acl_${sg{${tr{$sender_host_address}{.}{_}}}{^(.*)_.*\$}{\$1}}
27 acl_smtp_data = data_acl
34 warn condition = ${if def:h_x-rcpt-added:{yes}{no}}
35 message = X-data-added: Header added at data time
36 warn senders = rcpttest@test.ex
37 message = X-data-rcpt-count: $rcpt_count\n\
38 X-data-rcpt-defer-count: $rcpt_defer_count\n\
39 X-data-rcpt-fail-count: $rcpt_fail_count
40 warn message = X-message-body-size: $message_body_size
44 require domains = !nopass
46 require message = $local_part@$domain shall not pass
49 deny message = domain explicitly denied
50 log_message = DOMAIN EXPLICITLY DENIED
51 continue = this value is not used
52 domains = deny.test.ex
54 accept domains = +local_domains
56 message = $domain gets refused
57 domains = !refuse.test.ex
59 # Double to check caching
60 accept domains = +relay_domains
61 accept domains = +relay_domains
64 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
65 local_parts = $domain_data
68 accept senders = user1@domain1 : domain2 : +ok_senders
71 accept condition = ${if match{$local_part}{^x}{yes}{no}}
72 deny message = "local part of wrong type\n(quotes are literal)
75 accept hosts = 5.6.12.1
77 message = failed nested acl
85 accept acl = DIR/aux-fixed/TESTNUM.acl1
88 accept acl = acl_8_8_8
91 accept hosts = +ok9_hosts
92 deny message = don't like this host
94 accept hosts = 9.9.9.0/24
97 require verify = reverse_host_lookup
100 accept local_parts = defer_ok
101 verify = reverse_host_lookup/defer_ok
102 accept verify = reverse_host_lookup
105 deny message = host in DNS list $dnslist_domain: $dnslist_text
106 log_message = DNSLIST ($dnslist_domain: $dnslist_text)
107 dnslists = rbl.test.ex
112 message = sender verify failure
114 message = recipient verify failure
123 accept recipients = x@y
126 deny hosts = 23.23.23.0
127 message = sender must verify
132 warn message = X-Warn: sender didn't verify
136 deny message = denying domains=x
141 message = bounce messages can have only one recipient
142 condition = ${if > {$recipients_count}{0}{yes}{no}}
145 # Force host list expansion failure
147 deny hosts = ${if eq {1}{0}{}fail}
151 accept sender_domains = : okdomain
154 deny dnslists = test.ex/$sender_address_domain
158 deny message = domain=$dnslist_domain\n\
159 value=$dnslist_value\n\
160 matched=$dnslist_matched\n\
162 dnslists = test.ex=V4NET.0.0.1,127.0.0.2/$sender_address_domain
165 # This one tests what happens when a lookup key gets too long
167 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
170 # Settings of $domain and $local_part
172 warn message = Start: domain=$domain local_part=$local_part
174 warn local_parts = userx-vs
175 message = Vs: domain=$domain local_part=$local_part
178 warn message = Vr: domain=$domain local_part=$local_part
185 message = sender verify failure
186 verify = sender/no_details
187 message = recipient verify failure
190 # Incomplete DNS lookups
192 warn dnslists = test.again.dns
193 warn dnslists = +include_unknown : test.again.dns
194 warn dnslists = +exclude_unknown : test.again.dns
195 warn dnslists = +defer_unknown : test.again.dns
198 # Adding header at RCPT time and testing at DATA time
200 warn message = X-rcpt-added: An added header at RCPT time
204 warn message = X-Warn: $local_part
205 condition = ${substr_5:$local_part}
209 accept message = accepted by condition
210 condition = ${substr_5:$local_part}
213 warn message = xx: rcpt_count = $rcpt_count\n \
214 rcpt_defer_count = $rcpt_defer_count\n \
215 rcpt_fail_count = $rcpt_fail_count\n \
216 recipients_count = $recipients_count\n \
217 local_part = $local_part
218 accept local_parts = ^ok
221 accept message = ACL message for verification failure\n \
222 Original was >$acl_verify_message<
226 accept !acl = DIR/aux-fixed/0023.acl2
229 # ----- Transports -----
235 file = DIR/test-mail/$local_part
240 file = DIR/test-mail/okbatch
245 # ----- Routers -----
256 local_parts = ^userx : ^cond-
263 data = :fail: here is a fail message