Testsuite: munge for non-WITH_CONTENT_SCAN builds
[exim.git] / test / confs / 2012
1 # Exim test configuration 2012
2 # TLS client: verify certificate from server - fails
3
4 SERVER=
5
6 .include DIR/aux-var/tls_conf_prefix
7
8 primary_hostname = myhost.test.ex
9
10 FX = DIR/aux-fixed
11 S1 = FX/exim-ca/example.com/server1.example.com
12
13 CA1 =   S1/ca_chain.pem 
14 CERT1 = S1/server1.example.com.pem
15 KEY1 =  S1/server1.example.com.unlocked.key
16 CA2 =   FX/cert2
17 CERT2 = FX/cert2
18 KEY2 =  FX/cert2
19
20 # ----- Main settings -----
21
22 acl_smtp_rcpt = accept
23
24 log_selector =  +tls_peerdn+tls_certificate_verified
25
26 queue_only
27 queue_run_in_order
28
29 tls_advertise_hosts = *
30
31 # Set certificate only if server
32
33 tls_certificate = ${if eq {SERVER}{server}{CERT1}fail}
34 tls_privatekey = ${if eq {SERVER}{server}{KEY1}fail}
35
36
37 # ----- Routers -----
38
39 begin routers
40
41 server_dump:
42   driver = redirect
43   condition = ${if eq {SERVER}{server}{yes}{no}}
44   data = :blackhole:
45
46 client_x:
47   driver = accept
48   local_parts = userx
49   retry_use_local_part
50   transport = send_to_server_failcert
51   errors_to = ""
52
53 client_y:
54   driver = accept
55   local_parts = usery
56   retry_use_local_part
57   transport = send_to_server_retry
58
59 client_z:
60   driver = accept
61   local_parts = userz
62   retry_use_local_part
63   transport = send_to_server_crypt
64
65 client_q:
66   driver = accept
67   local_parts = userq
68   retry_use_local_part
69   transport = send_to_server_req_fail
70
71 client_r:
72   driver = accept
73   local_parts = userr
74   retry_use_local_part
75   transport = send_to_server_req_failname
76
77 client_s:
78   driver = accept
79   local_parts = users
80   retry_use_local_part
81   transport = send_to_server_req_passname
82
83 client_t:
84   driver = accept
85   local_parts = usert
86   retry_use_local_part
87   transport = send_to_server_req_failchain
88
89 client_u:
90   driver = accept
91   local_parts = useru
92   retry_use_local_part
93   transport = send_to_server_req_passchain
94
95
96 # ----- Transports -----
97
98 begin transports
99
100 # this will fail to verify the cert at HOSTIPV4 so fail the crypt requirement
101 send_to_server_failcert:
102   driver = smtp
103   allow_localhost
104   hosts = HOSTIPV4
105   port = PORT_D
106   hosts_try_fastopen =  :
107   hosts_require_tls = HOSTIPV4
108
109   tls_verify_certificates = CA2
110   tls_try_verify_hosts =
111   tls_verify_cert_hostnames =
112
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:
115   driver = smtp
116   allow_localhost
117   hosts = HOSTIPV4 : 127.0.0.1
118   port = PORT_D
119   hosts_try_fastopen =  :
120   hosts_require_tls = HOSTIPV4
121
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 =
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   port = PORT_D
133   hosts_try_fastopen =  :
134   hosts_require_tls = HOSTIPV4
135
136   tls_verify_certificates = CA2
137   tls_try_verify_hosts = *
138   tls_verify_cert_hostnames =
139
140 # this will fail to verify the cert at HOSTIPV4 and fallback to unencrypted
141 send_to_server_req_fail:
142   driver = smtp
143   allow_localhost
144   hosts = HOSTIPV4
145   port = PORT_D
146   hosts_try_fastopen =  :
147
148   tls_verify_certificates = CA2
149   tls_verify_hosts = *
150   tls_verify_cert_hostnames =
151
152  # this will fail to verify the cert name and fallback to unencrypted
153  send_to_server_req_failname:
154    driver =             smtp
155    allow_localhost
156    hosts =              serverbadname.example.com
157    port =               PORT_D
158    hosts_try_fastopen = :
159  
160    tls_verify_certificates =    CA1
161    tls_verify_cert_hostnames =  HOSTIPV4
162    tls_verify_hosts =           *
163  
164  # this will pass the cert verify including name check
165  send_to_server_req_passname:
166    driver =             smtp
167    allow_localhost
168    hosts =              server1.example.com
169    port =               PORT_D
170    hosts_try_fastopen = :
171  
172    tls_verify_certificates =    CA1
173    tls_verify_cert_hostnames =  HOSTIPV4
174    tls_verify_hosts =           *
175
176  # this will fail the cert verify name check, because CNAME rules
177  send_to_server_req_failchain:
178    driver =             smtp
179    allow_localhost
180    hosts =              serverchain1.example.com
181    port =               PORT_D
182    hosts_try_fastopen = :
183  
184    tls_verify_certificates =    CA1
185    tls_verify_cert_hostnames =  HOSTIPV4
186    tls_verify_hosts =           *
187
188  # this will pass the cert verify name check, because CNAME rules
189  send_to_server_req_passchain:
190    driver =             smtp
191    allow_localhost
192    hosts =              alternatename.server1.example.com
193    port =               PORT_D
194    hosts_try_fastopen = :
195  
196    tls_verify_certificates =    CA1
197    tls_verify_cert_hostnames =  HOSTIPV4
198    tls_verify_hosts =           *
199
200 # End