postfix SASLauthentication失败 – 内部authentication错误

我最近不得不将SMTP中继从Cablevision改为Verizon。 Verizon阻止端口25,但他们将通过端口465接受SSL( 按此 )。 我用这个和这个有stunnnel转发postfix的数据到端口465。

不幸的是,我的邮件没有出来。 我在mail.log中收到以下错误:

 Sep 8 15:16:25 DServ postfix/qmgr[6178]: A9EF9480429: from=<[email protected]>, size=545, nrcpt=1 (queue active) Sep 8 15:16:25 DServ postfix/smtp[6777]: A9EF9480429: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:12345, delay=231428, delays=231428/0.01/0.4/0, dsn=4.7.0, status=deferred (SASL authentication failed; server 127.0.0.1[127.0.0.1] said: 500 5.7.0 Unknown AUTH error -1 (Internal authentication error).) 

鸽子发出消息,但是,他们没有一个似乎是错误消息。 我也看到了以下几点:

 Sep 8 17:26:26 DServ postfix/error[7112]: D0B944801A9: to=<[email protected]>, relay=none, delay=197679, delays=197679/0.01/0/0.03, dsn=4.7.0, status=deferred (delivery temporarily suspended: SASL authentication failed; server 127.0.0.1[127.0.0.1] said: 500 5.7.0 Unknown AUTH error -1 (Internal authentication error).) 

在我的main.cf中,我有:

 relayhost = [127.0.0.1]:12345 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 

在/ etc / postfix / sasl_passwd中我有

 [127.0.0.1]:12345 [email protected]:MYPASSWORD 

我跑了:

 sudo postmap hash:/etc/postfix/sasl_passwd sudo service postfix restart 

如果我telnet localhost 12345 ,我可以到达verizon服务器。

任何帮助将不胜感激! 谢谢。

编辑下面的每个Costin,我跑openssl得到:

 CONNECTED(00000003) 3073435324:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:787: --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 7 bytes and written 305 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE --- 

它看起来像抱怨未知的协议。 我不确定从哪里拿到这里。

附加成功的telnetlogging:

 telnet localhost 12345 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 vms173023pub.verizon.net -- Server ESMTP (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) EHLO verizon.net 250-vms173023pub.verizon.net 250-8BITMIME 250-PIPELINING 250-CHUNKING 250-DSN 250-ENHANCEDSTATUSCODES 250-HELP 250-XLOOP 80E3E78D42E6EE2FDAB2C28EB1AA64CD 250-AUTH DIGEST-MD5 PLAIN LOGIN CRAM-MD5 250-AUTH=LOGIN PLAIN 250-ETRN 250-NO-SOLICITING 250 SIZE 20971520 AUTH LOGIN 334 VXNlcm5hbWU6 MYUSERNAME-IN-64 334 UGFzc3dvcmQ6 MYPASSWORD-IN-64 235 2.7.0 LOGIN authentication successful. 

我带了一些人,经过一些检查和testing,我们增加了smtp_sasl_mechanism_filter = loginsmtp_sasl_mechanism_filter = login 这清理了。

他解释说,强制postfix执行AUTH LOGIN(我在通过telnet进行testing时手动执行)。 smtp_sasl_mechanism_filter文档

我看着tail -F /var/log/mail.log和电子邮件出去了。 mailq运行显示一个缩小的队列,这是很好的。

谢谢,所有!

PS三点注意:

1)我删除了smtp_sasl_security_options = noanonymous 。 这可能是正确的方向,但没有完成。

2)我不需要使用smtp_generic_maps

其中一篇文章使用了这两种方法(并且Costinbuild议使用smtp_sasl_security_options )。

3) 本文有助于展示如何获取使用perl -MMIME::Base64 -e 'print encode_base64("john\@example.com\0john\@example.com\0password")';手动login的Base64密码。 perl -MMIME::Base64 -e 'print encode_base64("john\@example.com\0john\@example.com\0password")';

尝试添加到您的main.cf

smtp_sasl_security_options = noanonymous

然后重新加载postfixconfiguration

同样在telnet到localhost之后,尝试使用这里描述的步骤来testing与verizon的smtpauthentication连接: http : //www.ndchost.com/wiki/mail/test-smtp-auth-telnet

从文章replacetelnet mailserver.com 25命令
telnet localhost 12345

一些howtos省略提到你需要安装libsasl2-modules软件包。 请检查是否安装,如果没有安装。