我的 CentOS 6.4 版(最终版)机器上安装了 openldap-2.4.39-8.el6.x86_64。我在另一台机器上安装了 dovecot,我想为我的 dovecot 邮件用户执行 ldap 身份验证。这是我的 ldapsearch 结果目前的样子:
dn: dc=mailtest,dc=example,dc=net
objectClass: top
objectClass: dcObject
objectClass: organization
o: Test-Dovecot Lab, Inc.
dc: mailtest
dn: ou=People,dc=mailtest,dc=example,dc=net
objectClass: organizationalUnit
ou: People
这是我配置 dovecot-ldap.conf.ext 文件的方式:
user_attrs = \
=user=%{ldap:mailRoutingAddress}, \
=quota_rule=*:storage=%{ldap:messageQuotaHard}k
user_filter = (mailRoutingAddress=%u)
pass_attrs = \
=user=%{ldap:mailRoutingAddress}, \
=password=%{ldap:userPassword}, \
=userdb_quota_rule=*:storage=%{ldap:messageQuotaHard}k
pass_filter = (mailRoutingAddress=%u)
iterate_attrs = mailRoutingAddress=user
iterate_filter = (objectClass=messageStoreRecipient)
如果可能的话,我想将用户添加到 ldap 目录中并包含以下属性:
mailRoutingAddress
userPassword
mailRoutingHost or mailHost
messageQuotaHard
有人可以帮我做到这一点吗?