免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3117 | 回复: 4
打印 上一主题 下一主题

[Mail] 【求助】smtp通过ldap认证出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-16 16:52 |只看该作者 |倒序浏览
安装软件: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 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-07-16 23:44 |只看该作者
试试在slapd.conf 中加allow bind_v2

论坛徽章:
0
3 [报告]
发表于 2007-07-17 11:26 |只看该作者
今天不知道改了什么地址突然就好了
好像不是slapd.conf的原因
我再找找原因:)

论坛徽章:
0
4 [报告]
发表于 2007-07-23 11:21 |只看该作者
是什么原因?

我也碰到了..

论坛徽章:
0
5 [报告]
发表于 2007-12-27 17:47 |只看该作者
hanson2046  找到是什么原因了吗?
我也碰到同样的问题,请求帮忙!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP