Dovecot은 SASL 인증 메커니즘을 보고하지 않습니다.

Dovecot은 SASL 인증 메커니즘을 보고하지 않습니다.

Ubuntu에서 Postfix 및 Dovecot을 사용하여 메일 서버를 설정하는 도중에 이제 다른 도메인으로 메일을 보낼 수 있습니다. 그러나 나는 다른 사람으로부터 받을 수 없습니다. 로그에서 읽습니다.

Jun 14 09:34:35 postfix/smtpd[27426]: connect from mail-wg0-f44.google.com[74.125.82.44]
Jun 14 09:34:35 postfix/smtpd[27426]: warning: SASL: Connect to private/auth failed: Permission denied
Jun 14 09:34:35 postfix/smtpd[27426]: fatal: no SASL authentication mechanisms
Jun 14 09:34:36 postfix/master[18697]: warning: process /usr/lib/postfix/smtpd pid 27426 exit status 1
Jun 14 09:34:36 postfix/master[18697]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

내 구성에 실수가 있는지 전혀 알 수 없습니다. 파일은 auth다음과 같이 존재합니다.

srw-rw---- 1 vmail vmail 0 Jun 14 08:51 /var/spool/postfix/private/auth

다음은postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
dovecot_destination_recipient_limit = 1
inet_interfaces = all
mailbox_size_limit = 0
mydestination = $myhostname, localhost, localhost.$mydomain
myhostname = mail.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_data_restrictions = reject_multi_recipient_bounce
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_non_fqdn_sender reject_unknown_recipient_domain reject_unknown_sender_domain permit_mynetworks reject_sender_login_mismatch reject_unauth_destination check_recipient_access hash:/etc/postfix/roleaccount_exceptions reject_multi_recipient_bounce reject_non_fqdn_helo_hostname reject_invalid_helo_hostname check_helo_access pcre:/etc/postfix/helo_checks check_sender_mx_access cidr:/etc/postfix/bogus_mx permit
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
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
virtual_alias_maps = proxy:ldap:/etc/postfix/virtual_aliases.cf
virtual_gid_maps = static:10000
virtual_mailbox_domains = $mydomain
virtual_transport = dovecot
virtual_uid_maps = static:10000

그리고 그 중 하나dovecot -n

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-042stab106.6 x86_64 Ubuntu 14.04.2 LTS ext4
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
mail_location = maildir:/srv/mail/%n
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocols = " imap"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = vmail
    mode = 0660
    user = vmail
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
  }
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lda {
  postmaster_address = [email protected]
}

어떤 힌트라도 대단히 감사하겠습니다. 미리 도움을 주셔서 감사합니다.

답변1

postfix다른 uid와 엄격한 권한으로 인해 auth-daemon 소켓에 액세스할 수 없습니다 . 가장 쉬운 방법은 권한을 666(rw-rw-rw-)으로 변경하고 인증이 수정되었는지 확인하는 것입니다. 그런 다음 인증을 메일 소프트웨어로만 제한하기 위해 프로세스 UID/사용자를 처리해야 합니다.

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

관련 정보