免费注册 查看新帖 |

Chinaunix

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

[Mail] 求助:postfix+sasl2+mysql+extman+extmail的SMTP认证通不过 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-20 11:51 |只看该作者 |倒序浏览
5可用积分
求助:postfix+sasl2+mysql+extman+extmail的SMTP认证通不过
验证提示 535 错误
可以收信,不可以发信 webmail可以发
如果说SQL模块错误,POP3验证又没事哦,真是奇怪,我的smtp认证是用的daemond
daemond运行是正常的
日志里明明有提示密码验证已经通过,为什么又出错呢

maillog
  1. Jan 20 08:25:45 www postfix/smtpd[28535]: connect from unknown[119.145.251.18]
  2. Jan 20 08:25:45 www authdaemond: Authenticated: sysusername=<null>, sysuserid=1003, sysgroupid=1003, homedir=/var/mail/zs-taili.cn/sam, address=sam@zs-taili.cn, fullname=sam, maildir=/var/mail/zs-taili.cn/sam/Maildir/, quota=524288000S, options=disableimap=0,disablepop3=0,disablewebmail=0
  3. Jan 20 08:25:45 www postfix/smtpd[28535]: warning: SASL authentication failure: could not verify password
  4. Jan 20 08:25:45 www authdaemond: Authenticated: clearpasswd=test, passwd=$1$daGMb0Yk$dzf/LtnIl38yETXh21D5K1
  5. Jan 20 08:25:45 www postfix/smtpd[28535]: warning: unknown[119.145.251.18]: SASL LOGIN authentication failed: generic failure
  6. Jan 20 08:25:45 www postfix/smtpd[28535]: lost connection after AUTH from unknown[119.145.251.18]
  7. Jan 20 08:25:45 www postfix/smtpd[28535]: disconnect from unknown[119.145.251.18]
复制代码
auth.log

  1. Jan 20 08:25:45 www postfix/smtpd[28535]: sql_select option missing
  2. Jan 20 08:25:45 www postfix/smtpd[28535]: auxpropfunc error no mechanism available
复制代码
debug.log

  1. Jan 20 08:25:45 www postfix/smtpd[28535]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
  2. Jan 20 08:25:45 www authdaemond: received auth request, service=smtp, authtype=login
  3. Jan 20 08:25:45 www authdaemond: authmysql: trying this module
  4. Jan 20 08:25:45 www authdaemond: authmysqllib: connected. Versions: header 50089, client 50089, server 50089
  5. Jan 20 08:25:45 www authdaemond: SQL query: SELECT username, password, clearpwd, uidnumber, gidnumber, CONCAT('/var/mail/',homedir), CONCAT('/var/mail/',maildir), quota, name, CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail) FROM mailbox WHERE username = 'sam@zs-taili.cn'  AND (active='1')
  6. Jan 20 08:25:45 www authdaemond: password matches successfully
  7. Jan 20 08:25:45 www authdaemond: authmysql: sysusername=<null>, sysuserid=1003, sysgroupid=1003, homedir=/var/mail/zs-taili.cn/sam, address=sam@zs-taili.cn, fullname=sam, maildir=/var/mail/zs-taili.cn/sam/Maildir/, quota=524288000S, options=disableimap=0,disablepop3=0,disablewebmail=0
  8. Jan 20 08:25:45 www authdaemond: authmysql: clearpasswd=<null>, passwd=$1$daGMb0Yk$dzf/LtnIl38yETXh21D5K1
复制代码


smtpd.conf

  1. pwcheck_method: authdaemond
  2. log_level: 8
  3. mech_list: plain login
  4. authdaemond_path:/var/run/authdaemond/socket

  5. #pwcheck_method: auxprop
  6. auxprop_plugin: sql
  7. allowanonymouslogin: no
  8. allowplaintext: yes
  9. mech_list: PLAIN LOGIN
  10. srp_mda: md5
  11. password_format: crypt

  12. sql_engine: mysql
  13. sql_hostnames: localhost
  14. sql_user: tlmail
  15. sql_passwd: tlmail
  16. sql_database: tlmail
  17. sql_select: select password from mailbox where username='%u@%r' and active='1'

复制代码

论坛徽章:
0
2 [报告]
发表于 2010-01-20 11:56 |只看该作者
感觉是 smtpd.conf 文件的配置问题。你看一下:http://pieps.org/cyrus

Jan 20 08:25:45 www postfix/smtpd[28535]: sql_select option missing

select password from mailbox where username='%u@%r' and active='1' 我没用过 Extmail,它有 mailbox 这个表有 有 username/password这字段?

[ 本帖最后由 iheaing 于 2010-1-20 11:59 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2010-01-20 12:00 |只看该作者

回复 #2 iheaing 的帖子

很明显是smtpd.conf的问题。


  1. pwcheck_method: authdaemond
  2. log_level: 8
  3. mech_list: plain login
  4. authdaemond_path:/var/run/authdaemond/socket
复制代码


试试改成这个。

论坛徽章:
0
4 [报告]
发表于 2010-01-20 13:33 |只看该作者
改了还是一样不行,最开始是没有下面一段的

论坛徽章:
0
5 [报告]
发表于 2010-01-20 13:36 |只看该作者
我也希望是smtpd.conf问题啊,
从debug.log来看,auth是已经通过了的,为什么到了maillog里,就变成密码不匹配了呢?

论坛徽章:
0
6 [报告]
发表于 2010-01-20 13:49 |只看该作者

回复 #5 loveme99 的帖子

改好后提供认证日志。

论坛徽章:
0
7 [报告]
发表于 2010-01-20 14:31 |只看该作者
改过后的日志

maillog

  1. Jan 20 14:24:19 www postfix/smtpd[49062]: connect from unknown[119.145.251.18]
  2. Jan 20 14:24:19 www authdaemond: Authenticated: sysusername=<null>, sysuserid=1003, sysgroupid=1003, homedir=/var/mail/zs-taili.cn/sam, address=sam@zs-taili.cn, fullname=sam, maildir=/var/mail/zs-taili.cn/sam/Maildir/, quota=524288000S, options=<null>
  3. Jan 20 14:24:19 www authdaemond: Authenticated: clearpasswd=test, passwd=$1$5g9XL$7eg2pKICZw3fZuvvMYROP/
  4. Jan 20 14:24:19 www postfix/smtpd[49062]: warning: SASL authentication failure: could not verify password
  5. Jan 20 14:24:19 www postfix/smtpd[49062]: warning: unknown[119.145.251.18]: SASL LOGIN authentication failed: generic failure
  6. Jan 20 14:24:19 www postfix/smtpd[49062]: lost connection after AUTH from unknown[119.145.251.18]
  7. Jan 20 14:24:19 www postfix/smtpd[49062]: disconnect from unknown[119.145.251.18]
复制代码



debug.log

  1. Jan 20 14:24:19 www postfix/smtpd[49062]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
  2. Jan 20 14:24:19 www authdaemond: received auth request, service=smtp, authtype=login
  3. Jan 20 14:24:19 www authdaemond: authmysql: trying this module
  4. Jan 20 14:24:19 www authdaemond: authmysqllib: connected. Versions: header 50089, client 50089, server 50089
  5. Jan 20 14:24:19 www authdaemond: SQL query: SELECT username,password,"",uidnumber,gidnumber,CONCAT('/var/mail/',homedir),CONCAT('/var/mail/',maildir), quota, name FROM mailbox WHERE username = 'sam@zs-taili.cn'
  6. Jan 20 14:24:19 www authdaemond: password matches successfully
  7. Jan 20 14:24:19 www authdaemond: authmysql: sysusername=<null>, sysuserid=1003, sysgroupid=1003, homedir=/var/mail/zs-taili.cn/sam, address=sam@zs-taili.cn, fullname=sam, maildir=/var/mail/zs-taili.cn/sam/Maildir/, quota=524288000S, options=<null>
  8. Jan 20 14:24:19 www authdaemond: authmysql: clearpasswd=<null>, passwd=$1$5g9XL$7eg2pKICZw3fZuvvMYROP/
复制代码


auth.log


  1. Jan 20 14:24:19 www postfix/smtpd[49062]: sql_select option missing
  2. Jan 20 14:24:19 www postfix/smtpd[49062]: auxpropfunc error no mechanism available
复制代码


smtpd.conf

  1. pwcheck_method: authdaemond
  2. log_level: 8
  3. mech_list: plain login
  4. authdaemond_path:/var/run/authdaemond/socket
复制代码

[ 本帖最后由 loveme99 于 2010-1-20 14:35 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2010-01-20 14:43 |只看该作者

回复 #7 loveme99 的帖子

/var/run/authdaemond/socket
这个文件有?

论坛徽章:
0
9 [报告]
发表于 2010-01-20 15:21 |只看该作者
有啊,

  1. www# ls /var/run/authdaemond/socket
  2. /var/run/authdaemond/socket
复制代码

论坛徽章:
0
10 [报告]
发表于 2010-01-20 15:26 |只看该作者
我贴出我的 main.cf吧

  1. #queue_directory = /var/spool/postfix
  2. command_directory = /usr/local/sbin
  3. #daemon_directory = /usr/local/libexec/postfix

  4. #data_directory = /var/db/postfix

  5. #mail_owner = postfix
  6. #default_privs = nobody

  7. #relay_domains = $mydestination

  8. debug_peer_level = 2
  9. sendmail_path = /usr/local/sbin/sendmail

  10. newaliases_path = /usr/local/bin/newaliases
  11. mailq_path = /usr/local/bin/mailq

  12. #setgid_group = maildrop

  13. #html_directory = /usr/local/share/doc/postfix
  14. #manpage_directory = /usr/local/man
  15. #sample_directory = /usr/local/etc/postfix
  16. #readme_directory = /usr/local/share/doc/postfix


  17. #--------------ADD END------------------------

  18. ########################BASE#################
  19. bounce_template_file = /usr/local/etc/postfix/bounce.cf

  20. myhostname = tailigo.com
  21. smtp_helo_name = $myhostname

  22. local_transport = maildrop
  23. mailbox_transport = maildrop

  24. virtual_mailbox_base = /var/mail

  25. #alias_maps       = hash:/usr/local/etc/postfix/aliases
  26. #Alias_database         = hash:/usr/local/etc/postfix/aliases

  27. ####################MYSQL###################
  28. mydestination     =   mysql:/usr/local/etc/postfix/mysql-mydest.cf
  29. virtual_transport_maps     = mysql:/usr/local/etc/postfix/mysql-transport.cf
  30. virtual_alias_maps       = mysql:/usr/local/etc/postfix/mysql-alias.cf
  31. virtual_alias_domains = $virtual_alias_maps
  32. recipient_bcc_maps = mysql:/usr/local/etc/postfix/mysql-autobbc-in.cf
  33. sender_bcc_maps = mysql:/usr/local/etc/postfix/mysql-autobbc-out.cf
  34. virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql-virtual-mailbox-domains.cf
  35. virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql-virtual-mailbox-maps.cf
  36. local_recipient_maps = $virtual_mailbox_maps
  37. virtual_uid_maps     = mysql:/usr/local/etc/postfix/mysql-virtual-uid.cf
  38. virtual_gid_maps     = mysql:/usr/local/etc/postfix/mysql-virtual-gid.cf


  39. #####################Quota#######################
  40. virtual_create_maildirsize = yes
  41. virtual_mailbox_extended = yes
  42. virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql-virtual-quota.cf
  43. virtual_mailbox_limit_override = yes
  44. virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
  45. virtual_overquota_bounce = yes


  46. ##########################SASL###################
  47. #smtpd_sender_login_maps = mysql:/usr/local/etc/postfix/mysql-smtplogin.cf
  48. #smtpd_reject_unlisted_sender = yes
  49. smtpd_sasl_auth_enable     = yes
  50. smtpd_sasl_security_options = noanonymous
  51. broken_sasl_auth_clients   = yes
  52. smtpd_delay_reject = yes
  53. smtpd_sasl_local_domain = ''


  54. #smtpd_peername_lookup = no
  55. #smtpd_proxy_timeout = 180s
  56. smtpd_recipient_restrictions =
  57.     permit_mynetworks,
  58. #    check_client_access mysql:/usr/local/etc/postfix/mysql-access.cf,
  59.     permit_sasl_authenticated,
  60.     reject_non_fqdn_hostname,
  61.     reject_non_fqdn_sender,
  62.     reject_non_fqdn_recipient,
  63.     reject_unknown_recipient_domain,
  64.     reject_unknown_sender_domain,
  65. #    reject_unauth_pipelining,
  66.     reject_unauth_destination,
  67. #    reject_rbl_client cblless.anti-spam.org.cn,
  68. #    permit
  69. smtpd_client_restrictions = permit_sasl_authenticated
  70. #smtp_etrn_restrictions = permit_mynetworks,reject

  71. default_destination_recipient_limit = 1
  72. local_destination_concurrency_limit = 1
  73. maildrop_destination_recipient_limit = 1
  74. #smtpd_error_sleep_time = 0
  75. #smtpd_soft_error_limit = 10
  76. #smtpd_hard_error_limit = 20
  77. #default_process_limit = 500

  78. message_size_limit = 41943040

  79. smtpd_recipient_limit = 10
  80. bounce_queue_lifetime = 12h
  81. maximal_queue_lifetime = 24h

  82. smtpd_helo_required = yes
  83. strict_rfc821_envelopes = yes

复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP