Testsuite: case for malware= avast
[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 host_lookup_order = bydns
8 primary_hostname = server1.example.com
9 spool_directory = DIR/spool
10 log_file_path = DIR/spool/log/SERVER%slog
11 gecos_pattern = ""
12 gecos_name = CALLER_NAME
13
14
15 # ----- Main settings -----
16
17 domainlist local_domains = test.ex : *.test.ex
18
19 acl_smtp_rcpt = check_recipient
20 acl_smtp_data = check_data
21
22 log_selector = +tls_peerdn
23 remote_max_parallel = 1
24
25 tls_advertise_hosts = *
26
27 # Set certificate only if server
28 tls_certificate = ${if eq {SERVER}{server}\
29 {DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem}\
30 fail\
31 }
32 tls_privatekey = ${if eq {SERVER}{server}\
33 {DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key}\
34 fail}
35
36 # from cmdline define
37 tls_ocsp_file = OCSP
38
39
40 # ------ ACL ------
41
42 begin acl
43
44 check_recipient:
45   accept  domains = +local_domains
46   deny    message = relay not permitted
47
48 check_data:
49   warn    condition   = ${if def:h_X-TLS-out:}
50           logwrite = client claims: $h_X-TLS-out:
51   accept
52
53 logger:
54   accept condition = ${if !eq {msg} {${listextract{1}{$event_name}}}}
55   warn  logwrite = client ocsp status: $tls_out_ocsp \
56     (${listextract {${eval:$tls_out_ocsp+1}} \
57                 {notreq:notresp:vfynotdone:failed:verified}})
58   accept
59
60
61 # ----- Routers -----
62
63 begin routers
64
65 client:
66   driver = accept
67   condition = ${if eq {SERVER}{server}{no}{yes}}
68   retry_use_local_part
69   transport = send_to_server${if eq{$local_part}{nostaple}{1} \
70                                 {${if eq{$local_part}{norequire} {2} \
71                                 {${if eq{$local_part}{smtps} {4}{3}}} \
72                              }}}
73
74 server:
75   driver = redirect
76   data = :blackhole:
77   #retry_use_local_part
78   #transport = local_delivery
79
80
81 # ----- Transports -----
82
83 begin transports
84
85 local_delivery:
86   driver = appendfile
87   file = DIR/test-mail/$local_part
88   headers_add = TLS: cipher=$tls_cipher peerdn=$tls_peerdn
89   user = CALLER
90
91 send_to_server1:
92   driver = smtp
93   allow_localhost
94   hosts = HOSTIPV4
95   port = PORT_D
96   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
97   tls_verify_cert_hostnames =
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   event_action =        ${acl {logger}}
104
105 send_to_server2:
106   driver = smtp
107   allow_localhost
108   hosts = HOSTIPV4
109   port = PORT_D
110   tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem
111   tls_verify_cert_hostnames =
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   tls_try_verify_hosts =
128   tls_verify_cert_hostnames =
129   hosts_require_tls =  *
130   hosts_require_ocsp = *
131   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
132     (${listextract {${eval:$tls_out_ocsp+1}} \
133                 {notreq:notresp:vfynotdone:failed:verified}})
134   event_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   tls_verify_cert_hostnames =
145   protocol =           smtps
146   hosts_require_tls =  *
147   hosts_require_ocsp = *
148   headers_add = X-TLS-out: OCSP status $tls_out_ocsp \
149     (${listextract {${eval:$tls_out_ocsp+1}} \
150                 {notreq:notresp:vfynotdone:failed:verified}})
151   event_action =        ${acl {logger}}
152
153
154 # ----- Retry -----
155
156
157 begin retry
158
159 * * F,5d,1s
160
161
162 # End