Fix CVE-2016-1531
[exim.git] / test / confs / 5658
1 # Exim test configuration 5658
2 # OCSP stapling, client, events
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   accept condition = ${if !eq {msg} {${listextract{1}{$event_name}}}}
57   warn  logwrite = client ocsp status: $tls_out_ocsp \
58     (${listextract {${eval:$tls_out_ocsp+1}} \
59                 {notreq:notresp:vfynotdone:failed:verified}})
60   accept
61
62
63 # ----- Routers -----
64
65 begin routers
66
67 client:
68   driver = accept
69   condition = ${if eq {SERVER}{server}{no}{yes}}
70   retry_use_local_part
71   transport = send_to_server${if eq{$local_part}{nostaple}{1} \
72                                 {${if eq{$local_part}{norequire} {2} \
73                                 {${if eq{$local_part}{smtps} {4}{3}}} \
74                              }}}
75
76 server:
77   driver = redirect
78   data = :blackhole:
79   #retry_use_local_part
80   #transport = local_delivery
81
82
83 # ----- Transports -----
84
85 begin transports
86
87 local_delivery:
88   driver = appendfile
89   file = DIR/test-mail/$local_part
90   headers_add = TLS: cipher=$tls_cipher peerdn=$tls_peerdn
91   user = CALLER
92
93 send_to_server1:
94   driver = smtp
95   allow_localhost
96   hosts = HOSTIPV4
97   port = PORT_D
98   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
99   hosts_require_tls = *
100   hosts_request_ocsp = :
101   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
102     (${listextract {${eval:$tls_out_ocsp+1}} \
103                 {notreq:notresp:vfynotdone:failed:verified}})
104   event_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   event_action =        ${acl {logger}}
118
119 send_to_server3:
120   driver = smtp
121   allow_localhost
122   hosts = 127.0.0.1
123   port = PORT_D
124   helo_data = helo.data.changed
125   #tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server1.example.com/ca_chain.pem
126   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
127   hosts_require_tls =  *
128   hosts_require_ocsp = *
129   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
130     (${listextract {${eval:$tls_out_ocsp+1}} \
131                 {notreq:notresp:vfynotdone:failed:verified}})
132   event_action =        ${acl {logger}}
133
134 send_to_server4:
135   driver = smtp
136   allow_localhost
137   hosts = 127.0.0.1
138   port = PORT_D
139   helo_data = helo.data.changed
140   #tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server1.example.com/ca_chain.pem
141   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
142   protocol =           smtps
143   hosts_require_tls =  *
144   hosts_require_ocsp = *
145   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
146     (${listextract {${eval:$tls_out_ocsp+1}} \
147                 {notreq:notresp:vfynotdone:failed:verified}})
148   event_action =        ${acl {logger}}
149
150
151 # ----- Retry -----
152
153
154 begin retry
155
156 * * F,5d,1s
157
158
159 # End