添加 smtpd_sasl_auth_enable 选项后无法 telnet 到 Postfix SMTP 服务器

添加 smtpd_sasl_auth_enable 选项后无法 telnet 到 Postfix SMTP 服务器

我在 CentOS 7 机器上的 25 端口上安装了 Postfix SMTP 服务器。
为了测试它是否正常工作,我使用 telnet 连接到它,如下所示:

# telnet localhost 25

结果是:

Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 example.app ESMTP Postfix
EHLO test.com
250-example.app
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.

这意味着它工作正常。
但是现在,我在 Postfix 的配置文件中/etc/postfix/main.cf添加了以下行:

smtpd_sasl_auth_enable = yes

然后我postfix reload再次尝试 telnet 连接。结果是:

Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

如果没有收到220横幅线,则连接自动关闭。

我不明白为什么它不起作用。我读了整篇文章SASL 自述文件postfix.org 页面上没有提到smtpd_sasl_auth_enable这种效果。

请问这种情况下为什么会出现telnet无法建立连接的情况,如何解决?

答案1

我发现了问题,所以我想我会回答我自己的问题。

SASL 库缺少组件cyrus-sasl-plain

我安装了它 yum install cyrus-sasl-plain并且问题解决了。

更多信息请参见其他问题:POSTFIX 致命:没有 SASL 身份验证机制

相关内容