Fix CVE-2016-1531
[exim.git] / test / confs / 5658
1 # Exim test configuration 5658
2 # OCSP stapling, client, tpda
3
4 SERVER =
5
6 exim_path = EXIM_PATH
7 keep_environment =
8 host_lookup_order = bydns
9 primary_hostname = server1.example.com
10 rfc1413_query_timeout = 0s
11 spool_directory = DIR/spool
12 log_file_path = DIR/spool/log/SERVER%slog
13 gecos_pattern = ""
14 gecos_name = CALLER_NAME
15
16
17 # ----- Main settings -----
18
19 domainlist local_domains = test.ex : *.test.ex
20
21 acl_smtp_rcpt = check_recipient
22 acl_smtp_data = check_data
23
24 log_selector = +tls_peerdn
25 remote_max_parallel = 1
26
27 tls_advertise_hosts = *
28
29 # Set certificate only if server
30 tls_certificate = ${if eq {SERVER}{server}\
31 {DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem}\
32 fail\
33 }
34 tls_privatekey = ${if eq {SERVER}{server}\
35 {DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key}\
36 fail}
37
38 # from cmdline define
39 tls_ocsp_file = OCSP
40
41
42 # ------ ACL ------
43
44 begin acl
45
46 check_recipient:
47   accept  domains = +local_domains
48   deny    message = relay not permitted
49
50 check_data:
51   warn    condition   = ${if def:h_X-TLS-out:}
52           logwrite = client claims: $h_X-TLS-out:
53   accept
54
55 logger:
56   warn  logwrite = client ocsp status: $tls_out_ocsp \
57     (${listextract {${eval:$tls_out_ocsp+1}} \
58                 {notreq:notresp:vfynotdone:failed:verified}})
59   accept
60
61
62 # ----- Routers -----
63
64 begin routers
65
66 client:
67   driver = accept
68   condition = ${if eq {SERVER}{server}{no}{yes}}
69   retry_use_local_part
70   transport = send_to_server${if eq{$local_part}{nostaple}{1} \
71                                 {${if eq{$local_part}{norequire} {2} \
72                                 {${if eq{$local_part}{smtps} {4}{3}}} \
73                              }}}
74
75 server:
76   driver = redirect
77   data = :blackhole:
78   #retry_use_local_part
79   #transport = local_delivery
80
81
82 # ----- Transports -----
83
84 begin transports
85
86 local_delivery:
87   driver = appendfile
88   file = DIR/test-mail/$local_part
89   headers_add = TLS: cipher=$tls_cipher peerdn=$tls_peerdn
90   user = CALLER
91
92 send_to_server1:
93   driver = smtp
94   allow_localhost
95   hosts = HOSTIPV4
96   port = PORT_D
97   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
98   hosts_require_tls = *
99   hosts_request_ocsp = :
100   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
101     (${listextract {${eval:$tls_out_ocsp+1}} \
102                 {notreq:notresp:vfynotdone:failed:verified}})
103   tpda_delivery_action =        ${acl {logger}}
104   tpda_host_defer_action =      ${acl {logger}}
105
106 send_to_server2:
107   driver = smtp
108   allow_localhost
109   hosts = HOSTIPV4
110   port = PORT_D
111   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
112   hosts_require_tls = *
113 # note no ocsp mention here
114   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
115     (${listextract {${eval:$tls_out_ocsp+1}} \
116                 {notreq:notresp:vfynotdone:failed:verified}})
117   tpda_delivery_action =        ${acl {logger}}
118   tpda_host_defer_action =      ${acl {logger}}
119
120 send_to_server3:
121   driver = smtp
122   allow_localhost
123   hosts = 127.0.0.1
124   port = PORT_D
125   helo_data = helo.data.changed
126   #tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server1.example.com/ca_chain.pem
127   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
128   hosts_require_tls =  *
129   hosts_require_ocsp = *
130   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
131     (${listextract {${eval:$tls_out_ocsp+1}} \
132                 {notreq:notresp:vfynotdone:failed:verified}})
133   tpda_delivery_action =        ${acl {logger}}
134   tpda_host_defer_action =      ${acl {logger}}
135
136 send_to_server4:
137   driver = smtp
138   allow_localhost
139   hosts = 127.0.0.1
140   port = PORT_D
141   helo_data = helo.data.changed
142   #tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server1.example.com/ca_chain.pem
143   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
144   protocol =           smtps
145   hosts_require_tls =  *
146   hosts_require_ocsp = *
147   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
148     (${listextract {${eval:$tls_out_ocsp+1}} \
149                 {notreq:notresp:vfynotdone:failed:verified}})
150   tpda_delivery_action =        ${acl {logger}}
151   tpda_host_defer_action =      ${acl {logger}}
152
153
154 # ----- Retry -----
155
156
157 begin retry
158
159 * * F,5d,1s
160
161
162 # End