debian experimental exim-daemon-heavy config
[exim.git] / test / confs / 2012
... / ...
CommitLineData
1# Exim test configuration 2012
2# TLS client: verify certificate from server - 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
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
33tls_certificate = ${if eq {SERVER}{server}{CERT1}fail}
34tls_privatekey = ${if eq {SERVER}{server}{KEY1}fail}
35
36tls_verify_hosts = *
37tls_verify_certificates = ${if eq {SERVER}{server}{CERT2}fail}
38
39
40# ----- Routers -----
41
42begin routers
43
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:
63 driver = accept
64 local_parts = userz
65 retry_use_local_part
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
73
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
86
87# ----- Transports -----
88
89begin transports
90
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
96 port = PORT_D
97 hosts_try_fastopen = :
98 hosts_require_tls = HOSTIPV4
99 tls_certificate = CERT2
100 tls_privatekey = CERT2
101
102 tls_verify_certificates = CA2
103 tls_try_verify_hosts =
104 tls_verify_cert_hostnames =
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:
108 driver = smtp
109 allow_localhost
110 hosts = HOSTIPV4 : 127.0.0.1
111 port = PORT_D
112 hosts_try_fastopen = :
113 hosts_require_tls = HOSTIPV4
114 tls_certificate = CERT2
115 tls_privatekey = CERT2
116
117 tls_verify_certificates = \
118 ${if eq{$host_address}{127.0.0.1}{CA1}{CA2}}
119 tls_try_verify_hosts =
120 tls_verify_cert_hostnames =
121
122# this will fail to verify the cert but continue unverified though crypted
123send_to_server_crypt:
124 driver = smtp
125 allow_localhost
126 hosts = HOSTIPV4
127 port = PORT_D
128 hosts_try_fastopen = :
129 hosts_require_tls = HOSTIPV4
130 tls_certificate = CERT2
131 tls_privatekey = CERT2
132
133 tls_verify_certificates = CA2
134 tls_try_verify_hosts = *
135 tls_verify_cert_hostnames =
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
143 hosts_try_fastopen = :
144 tls_certificate = CERT2
145 tls_privatekey = CERT2
146
147 tls_verify_certificates = CA2
148 tls_verify_hosts = *
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
157 hosts_try_fastopen = :
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
171 hosts_try_fastopen = :
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 = *
178
179# End