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 -----
15 addresslist ok_senders = ok@ok.ok
17 domainlist local_domains = test.ex : *.test.ex
18 domainlist relay_domains = relay.test.ex
20 hostlist ok9_hosts = 9.9.9.9
24 qualify_domain = test.ex
25 trusted_users = CALLER
27 # Use first three components of address to select ACL
28 acl_smtp_rcpt = acl_${sg{${tr{$sender_host_address}{.}{_}}}{^(.*)_.*\$}{\$1}}
29 acl_smtp_data = data_acl
36 warn condition = ${if def:h_x-rcpt-added:{yes}{no}}
37 message = X-data-added: Header added at data time
38 warn senders = rcpttest@test.ex
39 message = X-data-rcpt-count: $rcpt_count\n\
40 X-data-rcpt-defer-count: $rcpt_defer_count\n\
41 X-data-rcpt-fail-count: $rcpt_fail_count
42 warn message = X-message-body-size: $message_body_size
46 require domains = !nopass
48 require message = $local_part@$domain shall not pass
51 deny message = domain explicitly denied
52 log_message = DOMAIN EXPLICITLY DENIED
53 continue = this value is not used
54 domains = deny.test.ex
56 accept domains = +local_domains
58 message = $domain gets refused
59 domains = !refuse.test.ex
61 # Double to check caching
62 accept domains = +relay_domains
63 accept domains = +relay_domains
66 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
67 local_parts = $domain_data
70 accept senders = user1@domain1 : domain2 : +ok_senders
73 accept condition = ${if match{$local_part}{^x}{yes}{no}}
74 deny message = "local part of wrong type\n(quotes are literal)
77 accept hosts = 5.6.12.1
79 message = failed nested acl
87 accept acl = DIR/aux-fixed/TESTNUM.acl1
90 accept acl = acl_8_8_8
93 accept hosts = +ok9_hosts
94 deny message = don't like this host
96 accept hosts = 9.9.9.0/24
99 require verify = reverse_host_lookup
103 deny message = host in DNS list $dnslist_domain: $dnslist_text
104 log_message = DNSLIST ($dnslist_domain: $dnslist_text)
105 dnslists = rbl.test.ex
110 message = sender verify failure
112 message = recipient verify failure
121 accept recipients = x@y
124 deny hosts = 23.23.23.0
125 message = sender must verify
130 warn message = X-Warn: sender didn't verify
134 deny message = denying domains=x
139 message = bounce messages can have only one recipient
140 condition = ${if > {$recipients_count}{0}{yes}{no}}
143 # Force host list expansion failure
145 deny hosts = ${if eq {1}{0}{}fail}
149 accept sender_domains = : okdomain
152 deny dnslists = test.ex/$sender_address_domain
156 deny message = domain=$dnslist_domain\n\
157 value=$dnslist_value\n\
158 matched=$dnslist_matched\n\
160 dnslists = test.ex=V4NET.0.0.1,127.0.0.2/$sender_address_domain
163 # This one tests what happens when a lookup key gets too long
165 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
168 # Settings of $domain and $local_part
170 warn message = Start: domain=$domain local_part=$local_part
172 warn local_parts = userx-vs
173 message = Vs: domain=$domain local_part=$local_part
176 warn message = Vr: domain=$domain local_part=$local_part
183 message = sender verify failure
184 verify = sender/no_details
185 message = recipient verify failure
188 # Incomplete DNS lookups
190 warn dnslists = test.again.dns
191 warn dnslists = +include_unknown : test.again.dns
192 warn dnslists = +exclude_unknown : test.again.dns
193 warn dnslists = +defer_unknown : test.again.dns
196 # Adding header at RCPT time and testing at DATA time
198 warn message = X-rcpt-added: An added header at RCPT time
202 warn message = X-Warn: $local_part
203 condition = ${substr_5:$local_part}
207 accept message = accepted by condition
208 condition = ${substr_5:$local_part}
211 warn message = xx: rcpt_count = $rcpt_count\n \
212 rcpt_defer_count = $rcpt_defer_count\n \
213 rcpt_fail_count = $rcpt_fail_count\n \
214 recipients_count = $recipients_count\n \
215 local_part = $local_part
216 accept local_parts = ^ok
219 accept message = ACL message for verification failure\n \
220 Original was >$acl_verify_message<
224 accept !acl = DIR/aux-fixed/0023.acl2
227 # ----- Transports -----
233 file = DIR/test-mail/$local_part
238 file = DIR/test-mail/okbatch
243 # ----- Routers -----
254 local_parts = ^userx : ^cond-
261 data = :fail: here is a fail message