Fix CVE-2016-1531
[exim.git] / test / confs / 5750
1 # Exim test configuration 5750 (dup of 5760)
2 # $tls_out_peercert - GnuTLS
3
4 SERVER=
5
6 exim_path = EXIM_PATH
7 keep_environment =
8 host_lookup_order = bydns
9 primary_hostname = myhost.test.ex
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 timezone = UTC
16
17 # ----- Main settings -----
18
19 acl_smtp_rcpt = accept
20
21 log_selector =  +tls_peerdn
22
23 queue_only
24 queue_run_in_order
25
26 tls_advertise_hosts = *
27
28 tls_certificate = DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem
29 tls_privatekey = DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
30
31 tls_verify_hosts = *
32 tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server2.example.com/ca_chain.pem
33
34 event_action = ${acl {server_cert_log}}
35
36 #
37
38 begin acl
39
40 server_cert_log:
41   accept condition = ${if eq {tls:cert}{$event_name}}
42          logwrite =  [$sender_host_address] \
43                         depth=$event_data \
44                         ${certextract{subject}{$tls_in_peercert}}
45   accept
46
47 ev_tls:
48   accept logwrite =  $event_name depth=$event_data \
49                         <${certextract {subject} {$tls_out_peercert}}>
50 #        message = noooo
51
52 ev_msg:
53   warn   logwrite =  $acl_arg1 $local_part
54   warn   logwrite =  ${if !def:tls_out_ourcert \
55                 {NO CLIENT CERT presented} \
56                 {Our cert SN: ${certextract{subject}{$tls_out_ourcert}}}}
57   accept condition = ${if !def:tls_out_peercert}
58          logwrite =  No Peer cert
59   accept logwrite = Peer cert:
60          logwrite =  ver <${certextract {version}       {$tls_out_peercert}}>
61          logwrite =  SN  <${certextract {subject}       {$tls_out_peercert}}>
62          logwrite =  SN; <${certextract {subject,>;}    {$tls_out_peercert}}>
63          logwrite =  SNCN<${certextract {subject,CN}    {$tls_out_peercert}}>
64          logwrite =  IN  <${certextract {issuer}        {$tls_out_peercert}}>
65          logwrite =  NB  <${certextract {notbefore}     {$tls_out_peercert}}>
66          logwrite =  NA  <${certextract {notafter}      {$tls_out_peercert}}>
67          logwrite =  SA  <${certextract {sig_algorithm} {$tls_out_peercert}}>
68          logwrite =  SG  <${certextract {signature}     {$tls_out_peercert}}>
69          logwrite =       ${certextract {subj_altname}  {$tls_out_peercert}{SAN <$value>}{(no SAN)}}
70 #        logwrite =       ${certextract {ocsp_uri}      {$tls_out_peercert} {OCU <$value>}{(no OCU)}}
71          logwrite =       ${certextract {crl_uri}       {$tls_out_peercert} {CRU <$value>}{(no CRU)}}
72
73 logger:
74   accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
75          acl = ev_msg $event_name $acl_arg2
76   accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}}
77          message =   ${acl {ev_tls}}
78   accept
79
80 # ----- Routers -----
81
82 begin routers
83
84 client:
85   driver = accept
86   condition = ${if eq {SERVER}{server}{no}{yes}}
87   retry_use_local_part
88   transport = send_to_server
89
90
91 # ----- Transports -----
92
93 begin transports
94
95 send_to_server:
96   driver = smtp
97   allow_localhost
98   hosts = 127.0.0.1
99   port = PORT_D
100
101   tls_certificate = DIR/aux-fixed/exim-ca/example.com/server2.example.com/server2.example.com.pem
102   tls_privatekey = DIR/aux-fixed/exim-ca/example.com/server2.example.com/server2.example.com.unlocked.key
103
104   tls_verify_certificates = DIR/aux-fixed/exim-ca/\
105        ${if eq {$local_part}{good}\
106 {example.com/server1.example.com/ca_chain.pem}\
107 {example.net/server1.example.net/ca_chain.pem}}
108
109   event_action =   ${acl {logger} {$event_name} {$domain} }
110
111 # ----- Retry -----
112
113
114 begin retry
115
116 * * F,5d,10s
117
118
119 # End