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
14 # ----- Main settings -----
18 addresslist ok_senders = ok@ok.ok
20 domainlist local_domains = test.ex : *.test.ex
21 domainlist relay_domains = relay.test.ex
23 hostlist ok9_hosts = 9.9.9.9
27 qualify_domain = test.ex
28 trusted_users = CALLER
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
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
49 require domains = !nopass
51 require message = $local_part@$domain shall not pass
54 deny message = domain explicitly denied
55 log_message = DOMAIN EXPLICITLY DENIED
56 continue = this value is not used
57 domains = deny.test.ex
59 accept domains = +local_domains
61 message = $domain gets refused
62 domains = !refuse.test.ex
64 # Double to check caching
65 accept domains = +relay_domains
66 accept domains = +relay_domains
69 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
70 local_parts = $domain_data
73 accept senders = user1@domain1 : domain2 : +ok_senders
76 accept condition = ${if match{$local_part}{^x}{yes}{no}}
77 deny message = "local part of wrong type\n(quotes are literal)
80 accept hosts = 5.6.12.1
82 message = failed nested acl
90 accept acl = DIR/aux-fixed/TESTNUM.acl1
93 accept acl = acl_8_8_8
96 accept hosts = +ok9_hosts
97 deny message = don't like this host
99 accept hosts = 9.9.9.0/24
102 require verify = reverse_host_lookup
105 accept local_parts = defer_ok
106 verify = reverse_host_lookup/defer_ok
107 accept verify = reverse_host_lookup
110 deny message = host in DNS list $dnslist_domain: $dnslist_text
111 log_message = DNSLIST ($dnslist_domain: $dnslist_text)
112 dnslists = rbl.test.ex
117 message = sender verify failure
119 message = recipient verify failure
128 accept recipients = x@y
131 deny hosts = 23.23.23.0
132 message = sender must verify
137 warn message = X-Warn: sender didn't verify
141 deny message = denying domains=x
146 message = bounce messages can have only one recipient
147 condition = ${if > {$recipients_count}{0}{yes}{no}}
150 # Force host list expansion failure
152 deny hosts = ${if eq {1}{0}{}fail}
156 accept sender_domains = : okdomain
159 deny dnslists = test.ex/$sender_address_domain
163 deny message = domain=$dnslist_domain\n\
164 value=$dnslist_value\n\
165 matched=$dnslist_matched\n\
167 dnslists = test.ex=V4NET.0.0.1,127.0.0.2/$sender_address_domain
170 # This one tests what happens when a lookup key gets too long
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
175 # Settings of $domain and $local_part
177 warn message = Start: domain=$domain local_part=$local_part
179 warn local_parts = userx-vs
180 message = Vs: domain=$domain local_part=$local_part
183 warn message = Vr: domain=$domain local_part=$local_part
190 message = sender verify failure
191 verify = sender/no_details
192 message = recipient verify failure
195 # Incomplete DNS lookups
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
203 # Adding header at RCPT time and testing at DATA time
205 warn message = X-rcpt-added: An added header at RCPT time
209 warn message = X-Warn: $local_part
210 condition = ${substr_5:$local_part}
214 accept message = accepted by condition
215 condition = ${substr_5:$local_part}
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
226 accept message = ACL message for verification failure\n \
227 Original was >$acl_verify_message<
231 accept !acl = DIR/aux-fixed/0023.acl2
234 # ----- Transports -----
240 file = DIR/test-mail/$local_part
245 file = DIR/test-mail/okbatch
250 # ----- Routers -----
261 local_parts = ^userx : ^cond-
268 data = :fail: here is a fail message