1 # Exim test configuration 5710 (dup of 5720)
2 # $tls_out_peercert - GnuTLS
6 .include DIR/aux-var/tls_conf_prefix
8 primary_hostname = myhost.test.ex
11 # ----- Main settings -----
13 acl_smtp_rcpt = accept
15 log_selector = +tls_peerdn
20 tls_advertise_hosts = *
22 tls_certificate = DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem
23 tls_privatekey = DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
26 tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/server2.example.com/ca_chain.pem
28 event_action = ${acl {server_cert_log}}
35 accept condition = ${if eq {tls:cert}{$event_name}}
36 logwrite = [$sender_host_address] \
38 ${certextract{subject}{$tls_in_peercert}}
42 accept logwrite = $event_name depth=$event_data \
43 <${certextract {subject} {$tls_out_peercert}}>
47 warn logwrite = $acl_arg1 $local_part
48 warn logwrite = ${if !def:tls_out_ourcert \
49 {NO CLIENT CERT presented} \
50 {Our cert SN: ${certextract{subject}{$tls_out_ourcert}}}}
51 accept condition = ${if !def:tls_out_peercert}
52 logwrite = No Peer cert
53 accept logwrite = Peer cert:
54 logwrite = ver <${certextract {version} {$tls_out_peercert}}>
55 logwrite = SN <${certextract {subject} {$tls_out_peercert}}>
56 logwrite = SN; <${certextract {subject,>;} {$tls_out_peercert}}>
57 logwrite = SNCN<${certextract {subject,CN} {$tls_out_peercert}}>
58 logwrite = IN <${certextract {issuer} {$tls_out_peercert}}>
59 logwrite = NB <${certextract {notbefore} {$tls_out_peercert}}>
60 logwrite = NA <${certextract {notafter} {$tls_out_peercert}}>
61 logwrite = SA <${certextract {sig_algorithm} {$tls_out_peercert}}>
62 logwrite = SG <${certextract {signature} {$tls_out_peercert}}>
63 logwrite = ${certextract {subj_altname} {$tls_out_peercert}{SAN <$value>}{(no SAN)}}
64 # logwrite = ${certextract {ocsp_uri} {$tls_out_peercert} {OCU <$value>}{(no OCU)}}
65 logwrite = ${certextract {crl_uri} {$tls_out_peercert} {CRU <$value>}{(no CRU)}}
67 # output list separator changes
68 logwrite = ${certextract {subj_altname,>:,dns} {$tls_out_peercert}{SAN <$value>}{(no SAN)}}
69 logwrite = ${certextract {subj_altname,dns,>:} {$tls_out_peercert}{SAN <$value>}{(no SAN)}}
72 accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}}
73 acl = ev_msg $event_name $acl_arg2
74 accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}}
75 message = ${acl {ev_tls}}
76 accept condition = ${if eq {smtp:ehlo}{$event_name}}
77 logwrite = $tls_out_cipher smtp:ehlo $event_data
78 logwrite = cipher_ $tls_out_cipher_std
79 logwrite = ver: $tls_out_ver
88 condition = ${if eq {SERVER}{server}{no}{yes}}
90 transport = send_to_server
93 # ----- Transports -----
102 hosts_try_fastopen = :
104 tls_certificate = DIR/aux-fixed/exim-ca/example.com/server2.example.com/server2.example.com.pem
105 tls_privatekey = DIR/aux-fixed/exim-ca/example.com/server2.example.com/server2.example.com.unlocked.key
107 tls_verify_certificates = DIR/aux-fixed/exim-ca/\
108 ${if eq {$local_part}{good}\
109 {example.com/server1.example.com/ca_chain.pem}\
110 {example.net/server1.example.net/ca_chain.pem}}
111 tls_try_verify_hosts =
112 tls_verify_cert_hostnames =
114 event_action = ${acl {logger} {$event_name} {$domain} }