
我已經用谷歌搜尋了這個錯誤,但我讀過/嘗試過的任何東西都不起作用 - 任何人都知道它是什麼
錯誤日誌:
Feb 23 22:35:36 localhost postfix/smtpd[5278]: connect from localhost.localdomain[127.0.0.1]
Feb 23 22:35:36 localhost postfix/smtpd[5278]: warning: SASL: Connect to smtpd failed: No such file or directory
Feb 23 22:35:36 localhost postfix/smtpd[5278]: fatal: no SASL authentication mechanisms
Feb 23 22:35:37 localhost postfix/master[5214]: warning: process /usr/libexec/postfix/smtpd pid 5278 exit status 1
Feb 23 22:35:37 localhost postfix/master[5214]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
後綴/main.cf:
queue_directory = /var/spool/postfix
smtpd_sasl_type = dovecot
smptd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
dovecot/conf.d/10-master.conf:
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
Dovecot 在 postfix 中可用:
[root@localhost ~]# postconf -a
cyrus
dovecot
插座:
[root@localhost conf.d]# ls -l /var/spool/postfix/private/auth
srw-rw-rw-. 1 postfix postfix 0 Feb 23 22:46 /var/spool/postfix/private/auth
Telnet 立即逾時:
[root@localhost ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
授權作品:
[root@localhost ~]# doveadm auth adrian
Password:
passdb: adrian auth succeeded
extra fields:
user=adrian
作業系統:Centos 6.4 Dovecot:2.1.17 後綴:2.6.6
postconf -n 的編輯結果:
[root@localhost ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 192.168.124.0/24 168.100.189.0/28, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = hash:/etc/postfix/relay_domains
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_type = dovecot
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
答案1
smtpd_sasl_path
正如你所看到的,我們的輸出中沒有postconf -n
為什麼?答案很簡單。因為沒有smtpd_sasl_path
設定。看看你的第一個片段:其中有一個拼字錯誤。你寫了smptd_sasl_path = 私有/身份驗證——但是sm之間是有差別的TPd 和 sm點d.
由於 Postfix 沒有關於在哪裡找到套接字的信息,Postfix 聲稱「連接失敗」。
修復它,它就會起作用。 :-)
最後:下次請記住:postconf -n
仔細閱讀並確保 Postfix 具有與您認為 Postfix 應該具有的相同的信息,這始終是查找故障的重要步驟。
答案2
有相同的錯誤,不同的問題。
必須編輯/etc/dovecot/conf.d/10-master.conf
並取消註釋unix_listener
並新增user
和group
行。
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}