免费注册 查看新帖 |

Chinaunix

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

[Mail] 求救:SASL LOGIN authentication failed [复制链接]

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-01-01 10:07 |只看该作者 |倒序浏览
5可用积分
遇到一个问题.不能通过客户端收发邮件,日志中出现.
Jan  1 10:01:34 localhost postfix/smtpd[4025]: warning: unknown[121.9.xxx.xx]: SASL LOGIN authentication failed: authentication failure

下面是我的postfix配置,麻烦各位指点一下.
root@mail postfix]# postconf -n
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 14336000
mydomain = xxxx.com
myhostname = mail.xxxx.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:689
virtual_mailbox_base = /var/mailbox
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 20971520
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 89
virtual_transport = virtual
virtual_uid_maps = static:689

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
2 [报告]
发表于 2009-01-01 10:09 |只看该作者
很奇怪,我安装完sasl2后,没有smtpd.conf这个文件,于是,我自己建了一个,内容如下:

[root@mail /]# more /usr/local/sasl2/lib/sasl2/smtpd.conf
pwcheck_method:authdaemond
log_level: 3
mech_listLAIN LOGIN
authdaemond_path:/var/spool/authdaemon/socket

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
3 [报告]
发表于 2009-01-01 10:10 |只看该作者
[root@mail authlib]# more authmysqlrc
MYSQL_SERVER            localhost
MYSQL_USERNAME          extmail
MYSQL_PASSWORD          extmail
MYSQL_SOCKET           /var/lib/mysql/mysql.sock
MYSQL_PORT      3306
MYSQL_OPT               0
MYSQL_DATABASE         extmail
MYSQL_USER_TABLE          mailbox
MYSQL_CRYPT_PWFIELD      password
MYSQL_UID_FIELD          '689'
MYSQL_GID_FIELD         '689'
MYSQL_LOGIN_FIELD    username
MYSQL_HOME_FIELD      '/var/mailbox'
MYSQL_NAME_FIELD        name
MYSQL_MAILDIR_FIELD      '/var/mailbox'
MYSQL_QUOTA_FIELD quota
MYSQL_WHERE_CLAUSE active='1'
DEFAULT_DOMAIN xxxx.com

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
4 [报告]
发表于 2009-01-01 10:11 |只看该作者
[root@mail authlib]# more authdaemonrc|grep -v '^#'


authmodulelist="authmysql"


authmodulelistorig="authmysql"


daemons=10


authdaemonvar=/var/spool/authdaemon


DEBUG_LOGIN=2


DEFAULTOPTIONS=""


LOGGEROPTS=""
subsystem=mail

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
5 [报告]
发表于 2009-01-01 10:15 |只看该作者
testsaslauthd测试本机的用户名和密码能通过的

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
6 [报告]
发表于 2009-01-01 10:27 |只看该作者
但是用smtp  也不能认证
[root@mail authlib]# testsaslauthd -s smtp -u test@xxxx.com -p test123
0: NO "authentication failed"

Jan  1 10:23:07 localhost authdaemond: received auth request, service=login, authtype=login
Jan  1 10:23:07 localhost authdaemond: authmysql: trying this module
Jan  1 10:23:07 localhost authdaemond: SQL query: SELECT username., password., "", '89'., '89', concat('/var/mailbox/',homedir)., concat('/var/mailbox/',maildir)., "", name, "" FROM mailbox. WHERE username. = "test@xxxx.com"
Jan  1 10:23:07 localhost authdaemond: supplied password '-ptest123' does not match encrypted password '$1$KwaEyhc/$2mVDfXXiGzCuegrlHg1jT/'
Jan  1 10:23:07 localhost authdaemond: authmysql: REJECT - try next module
Jan  1 10:23:07 localhost authdaemond: FAIL, all modules rejected


奇怪,这个'89'., '89'是从那里来的呢?

重启authdaemond后, 上面的错误变成

Jan  1 10:31:03 localhost authdaemond: modules="authmysql", daemons=10
Jan  1 10:31:03 localhost authdaemond: Installing libauthmysql
Jan  1 10:31:03 localhost authdaemond: Installation complete: authmysql


看来个'89'., '89' 是未重启authdaemond造成的

[ 本帖最后由 yuantong 于 2009-1-1 10:42 编辑 ]

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
7 [报告]
发表于 2009-01-01 12:18 |只看该作者
[root@mail ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 Welcome to our mail.xxxx.com ESMTP,Warning: Version not Available!
ehlo xxxx.com
250-mail.xxxx.com
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH LOGIN
334 VXNlcm5hbWU6
dGVzdEAzY29vYy5jb20AdGVzdA==
334 UGFzc3dvcmQ6
dGVzdEAzY29vYy5jb20AdGVzdDEyMw==
535 5.7.8 Error: authentication failed: authentication failure

论坛徽章:
0
8 [报告]
发表于 2009-01-01 19:21 |只看该作者
Jan  1 10:23:07 localhost authdaemond: supplied password '-ptest123' does not match encrypted password '$1$KwaEyhc/$2mVDfXXiGzCuegrlHg1jT/'

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
9 [报告]
发表于 2009-01-01 20:41 |只看该作者
楼上的兄弟,你不见我重启过authdaemond

你所帖的错误已经解决了吗?

现在的错误是
535 5.7.8 Error: authentication failed: authentication failure

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
10 [报告]
发表于 2009-01-02 08:18 |只看该作者
原帖由 yuantong 于 2009-1-1 20:41 发表
楼上的兄弟,你不见我重启过authdaemond

你所帖的错误已经解决了吗?

现在的错误是
535 5.7.8 Error: authentication failed: authentication failure


你没有仔细看楼上的
你的还是认证失败

上次报的是密码不匹配,你看看你这次的日志还是不是呀?
你telnet显示的也还认证失败
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP