Make {bounce,warn}_message_file expanded. Bug 2522
[exim.git] / test / confs / 2012
CommitLineData
afda344b 1# Exim test configuration 2012
52f93eed 2# TLS client: verify certificate from server - fails
afda344b
PH
3
4SERVER=
5
d4dc049f
JH
6.include DIR/aux-var/tls_conf_prefix
7
afda344b 8primary_hostname = myhost.test.ex
afda344b 9
e51c7be2
JH
10FX = DIR/aux-fixed
11S1 = FX/exim-ca/example.com/server1.example.com
12
13CA1 = S1/ca_chain.pem
14CERT1 = S1/server1.example.com.pem
15KEY1 = S1/server1.example.com.unlocked.key
16CA2 = FX/cert2
17CERT2 = FX/cert2
18KEY2 = FX/cert2
19
afda344b
PH
20# ----- Main settings -----
21
22acl_smtp_rcpt = accept
23
24log_selector = +tls_peerdn+tls_certificate_verified
25
26queue_only
27queue_run_in_order
28
29tls_advertise_hosts = *
30
31# Set certificate only if server
32
e51c7be2
JH
33tls_certificate = ${if eq {SERVER}{server}{CERT1}fail}
34tls_privatekey = ${if eq {SERVER}{server}{KEY1}fail}
afda344b
PH
35
36tls_verify_hosts = *
e51c7be2 37tls_verify_certificates = ${if eq {SERVER}{server}{CERT2}fail}
afda344b
PH
38
39
40# ----- Routers -----
41
42begin routers
43
52f93eed
WB
44server_dump:
45 driver = redirect
46 condition = ${if eq {SERVER}{server}{yes}{no}}
47 data = :blackhole:
48
49client_x:
50 driver = accept
51 local_parts = userx
52 retry_use_local_part
53 transport = send_to_server_failcert
54 errors_to = ""
55
56client_y:
57 driver = accept
58 local_parts = usery
59 retry_use_local_part
60 transport = send_to_server_retry
61
62client_z:
afda344b 63 driver = accept
52f93eed 64 local_parts = userz
afda344b 65 retry_use_local_part
52f93eed
WB
66 transport = send_to_server_crypt
67
68client_q:
69 driver = accept
70 local_parts = userq
71 retry_use_local_part
72 transport = send_to_server_req_fail
afda344b 73
e51c7be2
JH
74client_r:
75 driver = accept
76 local_parts = userr
77 retry_use_local_part
78 transport = send_to_server_req_failname
79
80client_s:
81 driver = accept
82 local_parts = users
83 retry_use_local_part
84 transport = send_to_server_req_passname
85
afda344b
PH
86
87# ----- Transports -----
88
89begin transports
90
52f93eed
WB
91# this will fail to verify the cert at HOSTIPV4 so fail the crypt requirement
92send_to_server_failcert:
93 driver = smtp
94 allow_localhost
95 hosts = HOSTIPV4
52f93eed 96 port = PORT_D
277b9979
JH
97 hosts_try_fastopen = :
98 hosts_require_tls = HOSTIPV4
e51c7be2
JH
99 tls_certificate = CERT2
100 tls_privatekey = CERT2
101
102 tls_verify_certificates = CA2
610ff438 103 tls_try_verify_hosts =
01a4a5c5 104 tls_verify_cert_hostnames =
52f93eed
WB
105
106# this will fail to verify the cert at HOSTIPV4 so fail the crypt, then retry on 127.1; ok
107send_to_server_retry:
afda344b
PH
108 driver = smtp
109 allow_localhost
110 hosts = HOSTIPV4 : 127.0.0.1
afda344b 111 port = PORT_D
277b9979
JH
112 hosts_try_fastopen = :
113 hosts_require_tls = HOSTIPV4
e51c7be2
JH
114 tls_certificate = CERT2
115 tls_privatekey = CERT2
116
afda344b 117 tls_verify_certificates = \
e51c7be2 118 ${if eq{$host_address}{127.0.0.1}{CA1}{CA2}}
610ff438 119 tls_try_verify_hosts =
01a4a5c5 120 tls_verify_cert_hostnames =
52f93eed 121
e51c7be2 122# this will fail to verify the cert but continue unverified though crypted
52f93eed
WB
123send_to_server_crypt:
124 driver = smtp
125 allow_localhost
126 hosts = HOSTIPV4
52f93eed 127 port = PORT_D
277b9979
JH
128 hosts_try_fastopen = :
129 hosts_require_tls = HOSTIPV4
e51c7be2
JH
130 tls_certificate = CERT2
131 tls_privatekey = CERT2
132
133 tls_verify_certificates = CA2
52f93eed 134 tls_try_verify_hosts = *
01a4a5c5 135 tls_verify_cert_hostnames =
52f93eed
WB
136
137# this will fail to verify the cert at HOSTIPV4 and fallback to unencrypted
138send_to_server_req_fail:
139 driver = smtp
140 allow_localhost
141 hosts = HOSTIPV4
142 port = PORT_D
277b9979 143 hosts_try_fastopen = :
e51c7be2
JH
144 tls_certificate = CERT2
145 tls_privatekey = CERT2
146
147 tls_verify_certificates = CA2
52f93eed 148 tls_verify_hosts = *
01a4a5c5
JH
149 tls_verify_cert_hostnames =
150
151 # this will fail to verify the cert name and fallback to unencrypted
152 send_to_server_req_failname:
153 driver = smtp
154 allow_localhost
155 hosts = HOSTIPV4
156 port = PORT_D
277b9979 157 hosts_try_fastopen = :
01a4a5c5
JH
158 tls_certificate = CERT2
159 tls_privatekey = CERT2
160
161 tls_verify_certificates = CA1
162 tls_verify_cert_hostnames = server1.example.net : server1.example.org
163 tls_verify_hosts = *
164
165 # this will pass the cert verify including name check
166 send_to_server_req_passname:
167 driver = smtp
168 allow_localhost
169 hosts = HOSTIPV4
170 port = PORT_D
277b9979 171 hosts_try_fastopen = :
01a4a5c5
JH
172 tls_certificate = CERT2
173 tls_privatekey = CERT2
174
175 tls_verify_certificates = CA1
176 tls_verify_cert_hostnames = noway.example.com : server1.example.com
177 tls_verify_hosts = *
e51c7be2 178
afda344b 179# End