debian experimental exim-daemon-heavy config
[exim.git] / test / confs / 2133
... / ...
CommitLineData
1# Exim test configuration 2133
2# TLS client: verify certificate from server - name-fails
3
4SERVER=
5
6.include DIR/aux-var/tls_conf_prefix
7
8primary_hostname = myhost.test.ex
9
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
20# ----- Main settings -----
21
22disable_ipv6 = true
23
24acl_smtp_rcpt = accept
25
26log_selector = +tls_peerdn+tls_certificate_verified
27
28queue_only
29queue_run_in_order
30
31tls_advertise_hosts = *
32
33# Set certificate only if server
34
35tls_certificate = ${if eq {SERVER}{server}{CERT1}fail}
36tls_privatekey = ${if eq {SERVER}{server}{KEY1}fail}
37
38tls_verify_hosts = *
39tls_verify_certificates = ${if eq {SERVER}{server}{CERT2}fail}
40
41
42# ----- Routers -----
43
44begin routers
45
46server_dump:
47 driver = redirect
48 condition = ${if eq {SERVER}{server}{yes}{no}}
49 data = :blackhole:
50
51client_x:
52 driver = accept
53 local_parts = userx
54 retry_use_local_part
55 transport = send_to_server_failcert
56 errors_to = ""
57
58client_y:
59 driver = accept
60 local_parts = usery
61 retry_use_local_part
62 transport = send_to_server_retry
63
64client_z:
65 driver = accept
66 local_parts = userz
67 retry_use_local_part
68 transport = send_to_server_crypt
69
70client_q:
71 driver = accept
72 local_parts = userq
73 retry_use_local_part
74 transport = send_to_server_req_fail
75
76client_r:
77 driver = accept
78 local_parts = userr
79 retry_use_local_part
80 transport = send_to_server_req_failname
81
82client_s:
83 driver = accept
84 local_parts = user_s
85 retry_use_local_part
86 transport = send_to_server_req_passname
87
88client_t:
89 driver = accept
90 local_parts = usert
91 retry_use_local_part
92 transport = send_to_server_req_failcarryon
93
94
95# ----- Transports -----
96
97begin transports
98
99# this will fail to verify the cert at HOSTIPV4 so fail the crypt requirement
100send_to_server_failcert:
101 driver = smtp
102 allow_localhost
103 hosts = HOSTIPV4
104 port = PORT_D
105 hosts_try_fastopen = :
106 hosts_require_tls = HOSTIPV4
107 tls_certificate = CERT2
108 tls_privatekey = CERT2
109
110 tls_verify_certificates = CA2
111
112# this will fail to verify the cert at HOSTIPV4 so fail the crypt, then retry on 127.1; ok
113send_to_server_retry:
114 driver = smtp
115 allow_localhost
116 hosts = HOSTIPV4 : 127.0.0.1
117 port = PORT_D
118 hosts_try_fastopen = :
119 hosts_require_tls = HOSTIPV4
120 tls_certificate = CERT2
121 tls_privatekey = CERT2
122
123 tls_verify_certificates = \
124 ${if eq{$host_address}{127.0.0.1}{CA1}{CA2}}
125
126# this will fail to verify the cert but continue unverified though crypted
127send_to_server_crypt:
128 driver = smtp
129 allow_localhost
130 hosts = HOSTIPV4
131 port = PORT_D
132 hosts_try_fastopen = :
133 hosts_require_tls = HOSTIPV4
134 tls_certificate = CERT2
135 tls_privatekey = CERT2
136
137 tls_verify_certificates = CA2
138 tls_try_verify_hosts = *
139
140# this will fail to verify the cert at HOSTNAME and fallback to unencrypted
141# Fail due to lack of correct CA
142send_to_server_req_fail:
143 driver = smtp
144 allow_localhost
145 hosts = HOSTNAME
146 port = PORT_D
147 hosts_try_fastopen = :
148 tls_certificate = CERT2
149 tls_privatekey = CERT2
150
151 tls_verify_certificates = CA2
152 tls_verify_hosts = *
153
154# this will fail to verify the cert name and fallback to unencrypted
155# fail because the cert is "server1.example.com" and the test system is something else
156send_to_server_req_failname:
157 driver = smtp
158 allow_localhost
159 hosts = HOSTNAME
160 port = PORT_D
161 hosts_try_fastopen = :
162 tls_certificate = CERT2
163 tls_privatekey = CERT2
164
165 tls_verify_certificates = CA1
166 tls_verify_cert_hostnames = *
167 tls_verify_hosts = *
168
169# this will pass the cert verify including name check
170# our stunt DNS has an A record for server1.example.com -> HOSTIPV4
171send_to_server_req_passname:
172 driver = smtp
173 allow_localhost
174 hosts = server1.example.com
175 port = PORT_D
176 hosts_try_fastopen = :
177 tls_certificate = CERT2
178 tls_privatekey = CERT2
179
180 tls_verify_certificates = CA1
181 tls_verify_cert_hostnames = *
182 tls_verify_hosts = *
183
184send_to_server_req_failcarryon:
185 driver = smtp
186 allow_localhost
187 hosts = HOSTNAME
188 port = PORT_D
189 hosts_try_fastopen = :
190 tls_certificate = CERT2
191 tls_privatekey = CERT2
192
193 tls_verify_certificates = CA1
194 tls_verify_cert_hostnames = *
195 tls_try_verify_hosts = *
196
197# End