我的 exim 服务器配置为在建立连接时请求客户端证书。我设置了一个 ACL(在 rcpt 阶段)来记录或添加一个标题。证书检查结果:
warn
encrypted = *
! verify = certificate
#condition = ${if def:tls_in_peerdn {yes}{no}} # -> newer versions of exim use $tls_in_peerdn!
condition = ${if def:tls_peerdn {yes}{no}}
add_header = X-TLS-Client-Certificate: invalid (${tls_peerdn})
log_message = Invalid TLS client certificate presented (${tls_peerdn}).
warn
encrypted = *
! verify = certificate
condition = ${if def:tls_peerdn {no}{yes}}
log_message = No TLS client certificate presented.
warn
verify = certificate
add_header = X-TLS-Client-Certificate: valid
condition = false
不幸的是,我看到的任何消息都没有被检查为有效。但检查无证书有效。
我设置
tls_try_verify_hosts = *
因此进行了检查,并且(使用 Debian,它包含在标准配置中)信任锚已配置并可以访问:
tls_verify_certificates = /etc/ssl/certs/ca-certificates.crt
测试...
openssl s_client -CAfile /etc/ssl/certs/ca-certificates.crt -verify 4 -connect mailserver.dom.tld:25 -starttls smtp -cert /etc/ssl/letsencrypt/fullchain.pem -key /etc/ssl/letsencrypt/privkey.pem
...从服务器到自身使用与服务器使用相同的密钥,包括按正确顺序的中间证书不会给出有效的检查结果。
我错过了什么?