- 论坛徽章:
- 0
|
安装软件:postfix,openldap,sasl2,courier-imap
认证方式:sasl2通过authdaemond取得ldap上的mail来认证
ldap上面使用qmail.schema 增加用户的mail,mailMessageStore等属性
当我用telnet localhost 25 来测试认证,出现错误。
[root@62 /usr/local/etc/postfix]# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.hanson.com.
Escape character is '^]'.
220 postfix.hanson.com ESMTP Postfix
auth login
334 VXNlcm5hbWU6
c21iaEBoYW5zb24uY29t
334 UGFzc3dvcmQ6
c21iaA==
535 5.7.0 Error: authentication failed: generic failure
日志显示:
Jul 16 14:10:48 62 authdaemond: authldaplib: refuse to authenticate smbh@hanson.com: uid=0, gid=0 (zero uid or gid not permitted)
Jul 16 14:10:48 62 postfix/smtpd[1935]: warning: SASL authentication failure: could not verify password
Jul 16 14:10:48 62 postfix/smtpd[1935]: warning: localhost.hanson.com[127.0.0.1]: SASL login authentication failed: generic failure
Jul 16 14:14:08 62 postfix/smtpd[1935]: disconnect from localhost.hanson.com[127.0.0.1]
应该是没有取得用户得uid和gid。但是我在authldaprc文件种已经设置了LDAP_GLOB_UID vmail,LDAP_GLOB_GID vmail。就是说用vmail这个系统用户得uid和gid啊。
我的authldaprc配置
LDAP_URI ldap://192.168.21.56
LDAP_BASEDN dc=hanson,dc=com
LDAP_BINDDN cn=Manager, dc=hanson, dc=com
LDAP_BINDPW pwd
LDAP_TIMEOUT 5
LDAP_AUTHBIND 1
LDAP_MAIL mail
LDAP_FILTER (accountStatus=active)
LDAP_DOMAIN hanson.com
LDAP_GLOB_UID vmail
LDAP_GLOB_GID vmail
LDAP_HOMEDIR homeDirectory
#LDAP_MAILROOT /var/mail
#LDAP_MAILDIR mailbox
#LDAP_DEFAULTDELIVERY defaultDelivery
#LDAP_MAILDIRQUOTA quota
LDAP_FULLNAME cn
#LDAP_CLEARPW userPassword
LDAP_CRYPTPW userPassword
#LDAP_UID uidNumber
#LDAP_GID gidNumber
LDAP_DEREF never
LDAP_TLS 0
google上面搜不到相关的解决办法。
[ 本帖最后由 hanson2046 于 2007-7-16 16:56 编辑 ] |
|