Fix CVE-2016-1531
[exim.git] / test / confs / 5601
1 # Exim test configuration 5601
2 # OCSP stapling, client
3
4 SERVER =
5
6 exim_path = EXIM_PATH
7 keep_environment  = ^EXIM_TESTHARNESS_DISABLE_[O]CSPVALIDITYCHECK$
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
31 tls_certificate = ${if eq {SERVER}{server}\
32 {DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem}\
33 fail\
34 }
35
36 #{DIR/aux-fixed/exim-ca/example.com/CA/CA.pem}\
37
38 tls_privatekey = ${if eq {SERVER}{server}\
39 {DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key}\
40 fail}
41
42 tls_ocsp_file = OCSP
43
44
45 # ------ ACL ------
46
47 begin acl
48
49 check_recipient:
50   accept  domains = +local_domains
51   deny    message = relay not permitted
52
53 check_data:
54   warn    condition   = ${if def:h_X-TLS-out:}
55           logwrite = client claims: $h_X-TLS-out:
56   accept
57
58 # ----- Routers -----
59
60 begin routers
61
62 client:
63   driver = accept
64   condition = ${if eq {SERVER}{server}{no}{yes}}
65   retry_use_local_part
66   transport = send_to_server${if eq{$local_part}{nostaple}{1} \
67                                 {${if eq{$local_part}{norequire} {2} \
68                                 {${if eq{$local_part}{smtps} {4}{3}}} \
69                              }}}
70
71 server:
72   driver = redirect
73   data = :blackhole:
74   #retry_use_local_part
75   #transport = local_delivery
76
77
78 # ----- Transports -----
79
80 begin transports
81
82 local_delivery:
83   driver = appendfile
84   file = DIR/test-mail/$local_part
85   headers_add = TLS: cipher=$tls_cipher peerdn=$tls_peerdn
86   user = CALLER
87
88 send_to_server1:
89   driver = smtp
90   allow_localhost
91   hosts = HOSTIPV4
92   port = PORT_D
93   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
94   hosts_require_tls = *
95   hosts_request_ocsp = :
96   headers_add = X-TLS-out: ocsp status $tls_out_ocsp \
97     (${listextract {${eval:$tls_out_ocsp+1}} \
98                 {notreq:notresp:vfynotdone:failed:verified}})
99
100 send_to_server2:
101   driver = smtp
102   allow_localhost
103   hosts = HOSTIPV4
104   port = PORT_D
105   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
106   hosts_require_tls = *
107 # note no ocsp mention here
108   headers_add = X-TLS-out: ocsp status $tls_out_ocsp \
109     (${listextract {${eval:$tls_out_ocsp+1}} \
110                 {notreq:notresp:vfynotdone:failed:verified}})
111
112 send_to_server3:
113   driver = smtp
114   allow_localhost
115   hosts = 127.0.0.1
116   port = PORT_D
117   helo_data = helo.data.changed
118   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
119   hosts_require_tls =  *
120   hosts_require_ocsp = *
121   headers_add = X-TLS-out: ocsp status $tls_out_ocsp \
122     (${listextract {${eval:$tls_out_ocsp+1}} \
123                 {notreq:notresp:vfynotdone:failed:verified}})
124
125 send_to_server4:
126   driver = smtp
127   allow_localhost
128   hosts = 127.0.0.1
129   port = PORT_D
130   helo_data = helo.data.changed
131   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
132   protocol =           smtps
133   hosts_require_tls =  *
134   hosts_require_ocsp = *
135   headers_add = X-TLS-out: ocsp status $tls_out_ocsp \
136     (${listextract {${eval:$tls_out_ocsp+1}} \
137                 {notreq:notresp:vfynotdone:failed:verified}})
138
139
140 # ----- Retry -----
141
142
143 begin retry
144
145 * * F,5d,1s
146
147
148 # End