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