Postfix + Dovecot 致命:没有 SASL 身份验证机制

Postfix + Dovecot 致命:没有 SASL 身份验证机制

当我尝试通过 telnet 登录时,我立即被踢出:

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

在日志中我收到以下错误消息:

Jul 17 23:15:26 mail postfix/smtpd[1606]: connect from localhost[::1]
Jul 17 23:15:26 mail postfix/smtpd[1606]: fatal: no SASL authentication mechanisms
Jul 17 23:15:27 mail postfix/master[597]: warning: process /usr/lib/postfix/smtpd pid 1606 exit status 1
Jul 17 23:15:27 mail postfix/master[597]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

当外部的 MTA 想要传递邮件时,我也收到了同样的错误消息。

我的10-master.conf:

# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666

}

Auth 似乎存在:

ls -l /var/spool/postfix/private/auth
srw-rw-rw- 1 root root 0 Jul 17 22:55 /var/spool/postfix/private/auth

最后但并非最不重要的一点是我的 postconf -n:

postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = XXX, localhost.XXX, localhost, $mydomain
myhostname = XXX
mynetworks_style = subnet
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = hash:/etc/postfix/relay_domains
relayhost = XXX
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sender_dependent_authentication = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport, $relay_domains
virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual_maps

我是不是哪里出错了?如果没有,我该如何进一步调试?

提前非常感谢你(:

编辑:

我的10-auth.conf:

disable_plaintext_auth = yes
auth_username_format = %Ln
auth_mechanisms = plain login
!include auth-ldap.conf.ext

答案1

你的 dovecot 配置中是否有 auth_mechanisms 行?

如果是的话,请发布,如果不是,那可能就是问题所在。

参考默认值:auth_mechanisms = plain login

但是您可能会想要一些其他的东西,因为您的 postfix sasl 安全选项,纯文本和登录都被视为纯文本。

更多的:http://wiki2.dovecot.org/Authentication/Mechanisms

相关内容