Fix CVE-2016-1531
[exim.git] / test / confs / 5651
1 # Exim test configuration 5651
2 # OCSP stapling, client
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
56 # ----- Routers -----
57
58 begin routers
59
60 client:
61   driver = accept
62   condition = ${if eq {SERVER}{server}{no}{yes}}
63   retry_use_local_part
64   transport = send_to_server${if eq{$local_part}{nostaple}{1} \
65                                 {${if eq{$local_part}{norequire} {2} \
66                                 {${if eq{$local_part}{smtps} {4}{3}}} \
67                              }}}
68
69 server:
70   driver = redirect
71   data = :blackhole:
72   #retry_use_local_part
73   #transport = local_delivery
74
75
76 # ----- Transports -----
77
78 begin transports
79
80 local_delivery:
81   driver = appendfile
82   file = DIR/test-mail/$local_part
83   headers_add = TLS: cipher=$tls_cipher peerdn=$tls_peerdn
84   user = CALLER
85
86 send_to_server1:
87   driver = smtp
88   allow_localhost
89   hosts = HOSTIPV4
90   port = PORT_D
91   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
92   hosts_require_tls = *
93   hosts_request_ocsp = :
94   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
95     (${listextract {${eval:$tls_out_ocsp+1}} \
96                 {notreq:notresp:vfynotdone:failed:verified}})
97
98 send_to_server2:
99   driver = smtp
100   allow_localhost
101   hosts = HOSTIPV4
102   port = PORT_D
103   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
104   hosts_require_tls = *
105 # note no ocsp mention here
106   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
107     (${listextract {${eval:$tls_out_ocsp+1}} \
108                 {notreq:notresp:vfynotdone:failed:verified}})
109
110 send_to_server3:
111   driver = smtp
112   allow_localhost
113   hosts = 127.0.0.1
114   port = PORT_D
115   helo_data = helo.data.changed
116   #tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server1.example.com/ca_chain.pem
117   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
118   hosts_require_tls =  *
119   hosts_require_ocsp = *
120   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
121     (${listextract {${eval:$tls_out_ocsp+1}} \
122                 {notreq:notresp:vfynotdone:failed:verified}})
123
124 send_to_server4:
125   driver = smtp
126   allow_localhost
127   hosts = 127.0.0.1
128   port = PORT_D
129   helo_data = helo.data.changed
130   #tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server1.example.com/ca_chain.pem
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