Debian

沒有可用的 sasl 身份驗證機制

  • October 22, 2013

到目前為止,我正在嘗試使用 Dovecot+Postfix+Mysql 一切正常。從 Debian 6 升級到 7 後,我無法發送郵件。接收仍然是可能的。

/var/log/mail.log

Oct 22 15:21:24 XXXXXXXX postfix/smtpd[17765]: warning: XXXXX: SASL PLAIN authentication failed: no mechanism available

我試圖研究該錯誤並發現了一些事情,但到目前為止並沒有真正的幫助。

這是我對 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
dovecot_destination_recipient_limit = 1
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 30720000
milter_default_action = accept
milter_protocol = 2
mydestination = mail.XXXX.com, mail.XXXX.com, localhost, localhost.localdomain
myhostname = XXXX.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
non_smtpd_milters = $smtpd_milters
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = inet:localhost:8891
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes

和我的 dovecot.conf

protocols = imap pop3
listen = *
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir

ssl_cert =</etc/ssl/certs/dovecot.pem
ssl_key =</etc/ssl/private/dovecot.pem

namespace {
   type=private
   separator = .
   prefix = INBOX.
   inbox = yes
}

protocol lda {
   log_path = /home/vmail/dovecot-deliver.log
   auth_socket_path = /var/run/dovecot/auth-master
   postmaster_address = postmaster@XXXX.com
   mail_plugins = sieve
}

plugin {
   sieve_global_path = /home/vmail/globalsieverc
}

protocol pop3 {
   pop3_uidl_format = %08Xu%08Xv
}

service auth {
   user = root
}

passdb {
       driver = sql
       args = /etc/dovecot/dovecot-sql.conf
}

userdb {
       driver = static
       args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
}

service auth {
 unix_listener /var/spool/postfix/private/auth {
   group = vmail
   mode = 0666
   user = vmail
 }
 unix_listener auth-master {
   mode = 0666
 }
}

我在升級後所做的唯一更改是調整 dovecot.conf 以使用已安裝的較新版本的 dovecot。我認為服務身份驗證部分中的某些內容是錯誤的,但經過大量Google搜尋後仍然找不到。

你能提供任何進一步的幫助嗎?

因此,您已告訴 dovecot 為身份驗證設置此服務:

‘unix_listener /var/spool/postfix/private/auth’

您在哪裡告訴 postfix 與該套接字通信?

引用自:https://serverfault.com/questions/547808