免费注册 查看新帖 |

Chinaunix

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

[Mail] postfix(ldap)邮件服务器,不能收邮件的问题。(已解决!谢谢各位的帮助!) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-15 13:24 |只看该作者 |倒序浏览
我按照文档(http://bbs.chinaunix.net/viewthread.php?tid=582380)配置了一篇Postfix-2.3+OpenLDAP-2.2+Courier-IMAP+Courier-Authlib+Maildrop的邮件服务器,经过无数次的重装后现在终于发送邮件了,并且telnet localhost 25 也正常通过了,但是却不能收取邮件。
这是我telnet localhost 25的结果

  1. #perl -MMIME::Base64 -e 'print encode_base64("test\@test.com");'
  2. dGVzdEB0ZXN0LmNvbQ==
  3. #perl -MMIME::Base64 -e 'print encode_base64("12345");'
  4. MTIzNDU=
  5. # telnet localhost 25
  6. Trying 127.0.0.1...
  7. Connected to mail.oswardhead.com (127.0.0.1).
  8. Escape character is '^]'.
  9. 220 www.test.com ESMTP "Version not Available"
  10. ehlo www.test.com
  11. 250-www.test.com
  12. 250-PIPELINING
  13. 250-SIZE 14336000
  14. 250-VRFY
  15. 250-ETRN
  16. 250-AUTH LOGIN PLAIN
  17. 250-AUTH=LOGIN PLAIN
  18. 250 8BITMIME
  19. suto login
  20. 502 Error: command not implemented
  21. auto login
  22. 502 Error: command not implemented
  23. auth login
  24. 334 VXNlcm5hbWU6
  25. dGVzdEB0ZXN0LmNvbQ==
  26. 334 UGFzc3dvcmQ6
  27. MTIzNDU=
  28. 235 Authentication successful
  29. quit
  30. 221 Bye
  31. Connection closed by foreign host.
复制代码

下面是我测试POP3和IMAP时也遇到的问题:

  1. # telnet localhost 110
  2. Trying 127.0.0.1...
  3. Connected to mail.oswardhead.com (127.0.0.1).
  4. Escape character is '^]'.
  5. +OK Hello there.
  6. user test@test.com
  7. +OK Password required.
  8. pass 12345
  9. -ERR Temporary problem, please try again later
  10. Connection closed by foreign host.
复制代码

错误日志如下:

  1. Sep 15 13:43:34 mail pop3d: Connection, ip=[::ffff:127.0.0.1]
  2. Sep 15 13:43:47 mail authdaemond: ldap_simple_bind_s failed: Invalid credentials
  3. Sep 15 13:43:47 mail pop3d: LOGIN FAILED, user=test@test.com, ip=[::ffff:127.0.0.1]
  4. Sep 15 13:43:47 mail pop3d: authentication error: Input/output error
复制代码


ldap的信息如下:

  1. conn=5 fd=13 ACCEPT from IP=127.0.0.1:1039 (IP=0.0.0.0:389)
  2. conn=5 op=0 BIND dn="cn=administrator,o=example,c=com" method=128
  3. conn=5 op=0 RESULT tag=97 err=49 text=
  4. conn=5 op=1 UNBIND
  5. conn=5 fd=13 closed
复制代码

各位大侠帮帮我吧谢谢了!

[ 本帖最后由 oswardhead 于 2006-9-19 09:05 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-09-15 13:46 |只看该作者
咋不弄个客户端试试呢?

你的Log里的信息是“authdaemond连接LDAP出错”,看一下authdaemond的配置。

论坛徽章:
0
3 [报告]
发表于 2006-09-15 14:15 |只看该作者
我拿客户端试过了,也是只能发不能收。我安装cyrus-sasl2.1.21的时候选的是编译方法为saslauthd密码验证的方式
# ./configure --disable-anon -enable-plain --enable-login --enable-ldapdb --with-ldap=/usr/local/openldap --with-saslauthd=/var/run/saslauthd --sysconfdir=/etc
按照文档saslauthd的密码验证方式配置方法配置的
# vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: login plain
# vi /etc/saslauthd.conf
ldap_servers: ldap://127.0.0.1
ldap_search_base: o=hosting,dc=test,dc=com
ldap_filter: (&(objectClass=JammMailAccount)(mail=%u@%r)(accountActive=TRUE)(delete=FALSE))
# vi /etc/sysconfig/saslauthd
MECH=ldap
我没有使用authdaemond啊?为什么需要authdaemond认证呢?

论坛徽章:
0
4 [报告]
发表于 2006-09-15 14:53 |只看该作者
原帖由 oswardhead 于 2006-9-15 14:15 发表
我拿客户端试过了,也是只能发不能收。我安装cyrus-sasl2.1.21的时候选的是编译方法为saslauthd密码验证的方式
# ./configure --disable-anon -enable-plain --enable-login --enable-ldapdb --with-ldap=/usr/ ...


楼上的,不妨看看chifeng写的postfix + ldap的文档:

http://www.extmail.org/docs/extmail_solution_freebsd

另外,您的pop3服务器用的是courier,而courier-imap需要authdaemond的支持,估计是这个地方没配置好。ldap报错提示了不正确的授权。检查1下authldaprc吧

论坛徽章:
0
5 [报告]
发表于 2006-09-15 15:07 |只看该作者
楼上的兄弟这是我安装安装Courier-authlib 0.56后的相关配置文件:
# vi /usr/local/etc/authlib/authdaemonrc
authmodulelist="authldap"
authmodulelistorig="authldap"

# vi /usr/local/etc/authlib/authldaprc
LDAP_SERVER                localhost
LDAP_PORT                389
LDAP_PROTOCOL_VERSION         3
LDAP_BASEDN                 dc=test,dc=com
LDAP_AUTHBIND                 1
LDAP_MAIL                mail
LDAP_FILTER                (objectClass=JammMailAccount)(accountActive=TRUE)(delete=FALSE)
LDAP_GLOB_UID                vmail
LDAP_GLOB_GID                vmail
LDAP_HOMEDIR                homeDirectory
LDAP_MAILDIR                mailbox
LDAP_DEFAULTDELIVERY        defaultDelivery
LDAP_MAILDIRQUOTA        quota
LDAP_FULLNAME                cn
LDAP_CRYPTPW                userPassword
#LDAP_CLEARPW                clearPassword
LDAP_DEREF                never
LDAP_TLS                0

您帮我看看哪里错了好吗?

论坛徽章:
0
6 [报告]
发表于 2006-09-15 15:12 |只看该作者
原帖由 oswardhead 于 2006-9-15 15:07 发表
楼上的兄弟这是我安装安装Courier-authlib 0.56后的相关配置文件:
# vi /usr/local/etc/authlib/authdaemonrc
authmodulelist="authldap"
authmodulelistorig="authldap"

# vi /usr/l ...


看上去丢了rootdn及rootpw的设置。具体的你可以参考我给您提供的url里,authldaprc部分的配置方法。

论坛徽章:
0
7 [报告]
发表于 2006-09-18 09:54 |只看该作者
请问Courier-authlib 0.56的authdaemond认证相关的配置文件除了/usr/local/etc/authlib/authdaemonrc和/usr/local/etc/authlib/authldaprc还有其他文件吗?
当我进行telnet localhost 110的测试时如下:

  1. [root@mail ~]# telnet localhost 110
  2. Trying 127.0.0.1...
  3. Connected to mail.oswardhead.com (127.0.0.1).
  4. Escape character is '^]'.
  5. +OK Hello there.
  6. user heyi@test.com
  7. +OK Password required.
  8. pass 12345
  9. -ERR Temporary problem, please try again later
  10. Connection closed by foreign host.
复制代码

ldap的信息如下:

  1. conn=5 fd=13 ACCEPT from IP=127.0.0.1:1039 (IP=0.0.0.0:389)
  2. conn=5 op=0 BIND dn="cn=administrator,o=example,c=com" method=128
  3. conn=5 op=0 RESULT tag=97 err=49 text=
  4. conn=5 op=1 UNBIND
  5. conn=5 fd=13 closed
复制代码

[ 本帖最后由 oswardhead 于 2006-9-18 13:02 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2006-09-18 14:35 |只看该作者
我在/usr/local/etc/authlib/authldaprc文件下找到了这2项设置好象和我的报错信息有关,请问这2条需要修改吗?怎么修改?谢谢。
LDAP_BINDDN             cn=administrator, o=example, c=com
LDAP_BINDPW             toto

只要把这2段注释掉就可以了。谢谢各位的帮助

[ 本帖最后由 oswardhead 于 2006-9-19 09:04 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP