Exim4:无法将LDAP服务器连接到“ldap_require_cert = hard”

我正在尝试使用自签名证书configurationeximslapd之间的安全连接。 ldap_require_cert = hard需要validationLDAP服务器提供的TLS证书,但在客户端validation时validation失败:

 2017-07-20 15:51:26 login authenticator failed for (client) [10.0.5.2]: 435 Unable to authenticate at present (set_id=user1): lookup of "user=uid=user1,ou=accounts,dc=domain,dc=local pass=123 ldap:///uid=user1,ou=accounts,dc=domain,dc=local?uid?sub?(&(uid=user1)(objectClass=VirtualMailAccount)(accountActive=TRUE))" gave DEFER: failed to initiate TLS processing on an LDAP session to server mail.domain.local:389 - ldap_start_tls_s() returned -1: Can't contact LDAP server 

一切工作正常ldap_require_cert = never ,但我需要validation服务器证书。

这是一个eximconfiguration文件:

 ... ldap_default_servers = mail.domain.local ldap_start_tls = true ldap_require_cert = hard ldap_version = 3 ldap_ca_cert_file = /etc/exim4/ssl/ldap_ca.cert ... 

我很确定这不是一个权限问题(我在调查中已经设置了777模式)。

而且我也成功地使用了dovecot的相同configuration,一切都很好。 这是一个dovecot-ldap.conf

 ... tls = yes tls_ca_cert_file = /etc/dovecot/ssl/ldap_ca.cert tls_require_cert = hard 

那么我做错了什么?

改变demand来解决问题。 从man ldap.confdemand | hard These keywords are equivalent. demand | hard These keywords are equivalent.