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