1 # Exim test configuration 0023
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
12 gecos_name = CALLER_NAME
14 # ----- Main settings -----
16 addresslist ok_senders = ok@ok.ok
18 domainlist local_domains = test.ex : *.test.ex
19 domainlist relay_domains = relay.test.ex
21 hostlist ok9_hosts = 9.9.9.9
25 qualify_domain = test.ex
26 trusted_users = CALLER
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
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
47 require domains = !nopass
49 require message = $local_part@$domain shall not pass
52 deny message = domain explicitly denied
53 log_message = DOMAIN EXPLICITLY DENIED
54 continue = this value is not used
55 domains = deny.test.ex
57 accept domains = +local_domains
59 message = $domain gets refused
60 domains = !refuse.test.ex
62 # Double to check caching
63 accept domains = +relay_domains
64 accept domains = +relay_domains
67 accept domains = lsearch;DIR/aux-fixed/TESTNUM.doms
68 local_parts = $domain_data
71 accept senders = user1@domain1 : domain2 : +ok_senders
74 accept condition = ${if match{$local_part}{^x}{yes}{no}}
75 deny message = "local part of wrong type\n(quotes are literal)
78 accept hosts = 5.6.12.1
80 message = failed nested acl
88 accept acl = DIR/aux-fixed/TESTNUM.acl1
91 accept acl = acl_8_8_8
94 accept hosts = +ok9_hosts
95 deny message = don't like this host
97 accept hosts = 9.9.9.0/24
100 require verify = reverse_host_lookup
104 deny message = host in DNS list $dnslist_domain: $dnslist_text
105 log_message = DNSLIST ($dnslist_domain: $dnslist_text)
106 dnslists = rbl.test.ex
111 message = sender verify failure
113 message = recipient verify failure
122 accept recipients = x@y
125 deny hosts = 23.23.23.0
126 message = sender must verify
131 warn message = X-Warn: sender didn't verify
135 deny message = denying domains=x
140 message = bounce messages can have only one recipient
141 condition = ${if > {$recipients_count}{0}{yes}{no}}
144 # Force host list expansion failure
146 deny hosts = ${if eq {1}{0}{}fail}
150 accept sender_domains = : okdomain
153 deny dnslists = test.ex/$sender_address_domain
157 deny message = domain=$dnslist_domain\n\
158 value=$dnslist_value\n\
159 matched=$dnslist_matched\n\
161 dnslists = test.ex=V4NET.0.0.1,127.0.0.2/$sender_address_domain
164 # This one tests what happens when a lookup key gets too long
166 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
169 # Settings of $domain and $local_part
171 warn message = Start: domain=$domain local_part=$local_part
173 warn local_parts = userx-vs
174 message = Vs: domain=$domain local_part=$local_part
177 warn message = Vr: domain=$domain local_part=$local_part
184 message = sender verify failure
185 verify = sender/no_details
186 message = recipient verify failure
189 # Incomplete DNS lookups
191 warn dnslists = test.again.dns
192 warn dnslists = +include_unknown : test.again.dns
193 warn dnslists = +exclude_unknown : test.again.dns
194 warn dnslists = +defer_unknown : test.again.dns
197 # Adding header at RCPT time and testing at DATA time
199 warn message = X-rcpt-added: An added header at RCPT time
203 warn message = X-Warn: $local_part
204 condition = ${substr_5:$local_part}
208 accept message = accepted by condition
209 condition = ${substr_5:$local_part}
212 warn message = xx: rcpt_count = $rcpt_count\n \
213 rcpt_defer_count = $rcpt_defer_count\n \
214 rcpt_fail_count = $rcpt_fail_count\n \
215 recipients_count = $recipients_count\n \
216 local_part = $local_part
217 accept local_parts = ^ok
220 accept message = ACL message for verification failure\n \
221 Original was >$acl_verify_message<
225 accept !acl = DIR/aux-fixed/0023.acl2
228 # ----- Transports -----
234 file = DIR/test-mail/$local_part
239 file = DIR/test-mail/okbatch
244 # ----- Routers -----
255 local_parts = ^userx : ^cond-
262 data = :fail: here is a fail message