![pam_authenticate() 失败:身份验证失败(/etc/pam.d/imap 丢失?)](https://linux22.com/image/693839/pam_authenticate()%20%E5%A4%B1%E8%B4%A5%EF%BC%9A%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E5%A4%B1%E8%B4%A5%EF%BC%88%2Fetc%2Fpam.d%2Fimap%20%E4%B8%A2%E5%A4%B1%EF%BC%9F%EF%BC%89.png)
我点击了另一个网站上的链接,该网站上发布了与此网站相同的问题,但该链接导致 404。我发现其他链接都指向 pam 失败,并尝试更改 dovecot.conf,如其他解决方案中所述。实际上,上面发布的错误不再出现,但我仍然无法进行身份验证。passdb { args = %s driver = shadow } 但那没有用。/var/log/mail.log
davomail postfix/smtpd[19906]: NOQUEUE: 拒绝:来自 mail-yw0-f173.google.com[209.85.161.173] 的 RCPT: 454 4.7.1: 中继访问被拒绝;来自= 到= proto=ESMTP helo=
dovecot配置文件
disable_plaintext_auth = no
mail_privileged_group = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
userdb {
driver = passwd
}
passdb {
args = %s
driver = passwd
}
protocols = " imap"
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
ssl=required
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
home_mailbox = Maildir/
inet_interfaces = all
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mailbox_size_limit = 0
mydestination = mail.domain.com, domain.com, localhost localhost.localdomain
mydomain = davomail.com
myhostname = mail.davomail.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_cert_file = /etc/ssl/certs/mailcert.pem
smtpd_tls_key_file = /etc/ssl/private/mail.key
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
答案1
我在调试时发现 pam.d 文件全都乱了。一开始它询问文件是否存在 - 所以我创建了它。最后,当我删除 pam.d/imap 文件时,statertd 开始工作。我一开始出现错误的原因是 dovecot.conf 中的配置错误。
passdb { args = %s driver = passwd } 应该是
passdb { 参数 = %s 驱动程序 = pam }