1 # Exim test configuration 2012
2 # TLS client: verify certificate from server - fails
6 .include DIR/aux-var/tls_conf_prefix
8 primary_hostname = myhost.test.ex
11 S1 = FX/exim-ca/example.com/server1.example.com
14 CERT1 = S1/server1.example.com.pem
15 KEY1 = S1/server1.example.com.unlocked.key
20 # ----- Main settings -----
22 acl_smtp_rcpt = accept
24 log_selector = +tls_peerdn+tls_certificate_verified
29 tls_advertise_hosts = *
31 # Set certificate only if server
33 tls_certificate = ${if eq {SERVER}{server}{CERT1}fail}
34 tls_privatekey = ${if eq {SERVER}{server}{KEY1}fail}
43 condition = ${if eq {SERVER}{server}{yes}{no}}
50 transport = send_to_server_failcert
57 transport = send_to_server_retry
63 transport = send_to_server_crypt
69 transport = send_to_server_req_fail
75 transport = send_to_server_req_failname
81 transport = send_to_server_req_passname
87 transport = send_to_server_req_failchain
93 transport = send_to_server_req_passchain
96 # ----- Transports -----
100 # this will fail to verify the cert at HOSTIPV4 so fail the crypt requirement
101 send_to_server_failcert:
106 hosts_try_fastopen = :
107 hosts_require_tls = HOSTIPV4
109 tls_verify_certificates = CA2
110 tls_try_verify_hosts =
111 tls_verify_cert_hostnames =
113 # this will fail to verify the cert at HOSTIPV4 so fail the crypt, then retry on 127.1; ok
114 send_to_server_retry:
117 hosts = HOSTIPV4 : 127.0.0.1
119 hosts_try_fastopen = :
120 hosts_require_tls = HOSTIPV4
122 tls_verify_certificates = \
123 ${if eq{$host_address}{127.0.0.1}{CA1}{CA2}}
124 tls_try_verify_hosts =
125 tls_verify_cert_hostnames =
127 # this will fail to verify the cert but continue unverified though crypted
128 send_to_server_crypt:
133 hosts_try_fastopen = :
134 hosts_require_tls = HOSTIPV4
136 tls_verify_certificates = CA2
137 tls_try_verify_hosts = *
138 tls_verify_cert_hostnames =
140 # this will fail to verify the cert at HOSTIPV4 and fallback to unencrypted
141 send_to_server_req_fail:
146 hosts_try_fastopen = :
148 tls_verify_certificates = CA2
150 tls_verify_cert_hostnames =
152 # this will fail to verify the cert name and fallback to unencrypted
153 send_to_server_req_failname:
156 hosts = serverbadname.example.com
158 hosts_try_fastopen = :
160 tls_verify_certificates = CA1
161 tls_verify_cert_hostnames = HOSTIPV4
164 # this will pass the cert verify including name check
165 send_to_server_req_passname:
168 hosts = server1.example.com
170 hosts_try_fastopen = :
172 tls_verify_certificates = CA1
173 tls_verify_cert_hostnames = HOSTIPV4
176 # this will fail the cert verify name check, because CNAME rules
177 send_to_server_req_failchain:
180 hosts = serverchain1.example.com
182 hosts_try_fastopen = :
184 tls_verify_certificates = CA1
185 tls_verify_cert_hostnames = HOSTIPV4
188 # this will pass the cert verify name check, because CNAME rules
189 send_to_server_req_passchain:
192 hosts = alternatename.server1.example.com
194 hosts_try_fastopen = :
196 tls_verify_certificates = CA1
197 tls_verify_cert_hostnames = HOSTIPV4