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

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

我正在尝试配置一个使用 dovecot 进行身份验证的简单电子邮件服务器。我对电子邮件流程不熟悉,无法弄清楚这里的问题是什么: postfix/smtpd[26148]: fatal: no SASL authentication mechanisms

我的 postfix 的配置文件:

tpd_banner = $myhostname ESMTP $mail_name (Ubuntu/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mynetworks = 127.0.0.0/8, 10.0.0.0/24
mailbox_size_limit = 0
home_mailbox = Maildir/
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noplaintext,noanonymous
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth-client

我的鸽舍配置:

auth_mechanisms = plain cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n
passdb {
  args = /etc/dovecot/passwd
  driver = passwd-file
}
protocols = imap pop3
service auth {
  executable = /usr/lib/dovecot/auth
  user = root
}
service imap-login {
  chroot = login
  executable = /usr/lib/dovecot/imap-login
  user = dovecot
}
service imap {
  executable = /usr/lib/dovecot/imap
}
service pop3-login {
  chroot = login
  executable = /usr/lib/dovecot/pop3-login
  user = dovecot
}
service pop3 {
  executable = /usr/lib/dovecot/pop3
}
ssl = no
userdb {
  args = /etc/dovecot/users
  driver = passwd-file
}
valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

这个配置有什么问题?

答案1

我不确定您的套接字 private/auth-client 是否存在。尝试 smtpd_sasl_path = private/auth在 main.cf 中将其替换为:。

答案2

问题是我必须生成 TLS 证书并让 dovecot 和 postfix 使用它。此后,dovecot 将自动生成 private/auth 文件。

相关内容