접미사 경고: SASL: /var/spool/postfix/private/auth에 연결하지 못했습니다. 해당 파일 또는 디렉터리가 없습니다.

접미사 경고: SASL: /var/spool/postfix/private/auth에 연결하지 못했습니다. 해당 파일 또는 디렉터리가 없습니다.

검색했지만 답변을 찾지 못했고 아이디어가 부족합니다. 나는 구성을 구문 분석하거나 이 오류의 원인이 무엇인지 이해하기에는 postfix 및 dovecot에 대해 충분히 알지 못합니다.

warning: SASL: Connect to /var/spool/postfix/private/auth failed: No such file or directory
fatal: no SASL authentication mechanisms

SASL을 사용하여 postfix를 위해 외부 클라이언트(예: Thunderbird)에 연결할 수 없습니다. 나는 그것이 명백한 것이기를 바라고 있지만 나는 그것을 볼 수 없습니다.

  1. /var/spool/postfix/private/auth존재합니다. postfix의 소유입니다. Dovecot은 사용자로 postfix를 사용하도록 설정되어 있습니다.

  2. Dovecot이 실행 중이며 듣고 있습니다.
    unix 2 [ ACC ] STREAM LISTENING 241906 12768/dovecot /var/spool/postfix/private/auth

  3. postconf -n산출:

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    compatibility_level = 2
    inet_interfaces = all
    inet_protocols = all
    local_recipient_maps = $virtual_mailbox_maps
    local_transport = virtual
    mailbox_size_limit = 0
    milter_default_action = accept
    milter_protocol = 2
    mydestination = $myhostname, my-server.my-server.com, my-server, localhost.localdomain, localhost
    myhostname = my-server
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    myorigin = /etc/mailname
    non_smtpd_milters = inet:localhost:12301
    readme_directory = no
    recipient_delimiter = +
    relay_domains = $mydestination, proxy:pgsql:/etc/postfix/pgsql/relay_domains.cf
    relayhost =
    smtp_sasl_auth_enable = yes
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_milters = inet:localhost:12301
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = /var/spool/postfix/private/auth
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_type = dovecot
    smtpd_tls_cert_file = /etc/letsencrypt/live/mail.my-server.com/fullchain.pem
    smtpd_tls_key_file = /etc/letsencrypt/live/mail.my-server.com/privkey.pem
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    virtual_alias_maps = proxy:pgsql:/etc/postfix/sql/psql_virtual_alias_maps.cf, proxy:pgsql:/etc/postfix/sql/psql_virtual_alias_domain_maps.cf, proxy:pgsql:/etc/postfix/sql/psql_virtual_alias_domain_catchall_maps.cf
    virtual_gid_maps = static:113
    virtual_mailbox_base = /var/mail/vmail
    virtual_mailbox_domains = proxy:pgsql:/etc/postfix/sql/psql_virtual_domains_maps.cf
    virtual_mailbox_limit = 512000000
    virtual_mailbox_maps = proxy:pgsql:/etc/postfix/sql/psql_virtual_mailbox_maps.cf, proxy:pgsql:/etc/postfix/sql/psql_virtual_alias_domain_mailbox_maps.cf
    virtual_minimum_uid = 113
    virtual_transport = virtual
    virtual_uid_maps = static:113
    
  4. dovecot -n산출:

    # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
    # Pigeonhole version 0.4.21 (92477967)
    # OS: Linux 4.15.0-66-generic x86_64 Ubuntu 18.04.3 LTS ext4
    auth_mechanisms = plain login
    first_valid_uid = 113
    log_path = /var/log/dovecot.log
    login_greeting = My Mail Server
    mail_location = maildir:/var/mail/vmail/%u/
    mail_max_userip_connections = 50
    mail_plugins = " zlib"
    mail_privileged_group = mail
    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 Spam {
        special_use = \Junk
      }
      mailbox Trash {
        special_use = \Trash
      }
      prefix =
      type = private
    }
    passdb {
      driver = pam
    }
    passdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    plugin {
      zlib_save = gz
      zlib_save_level = 6
    }
    protocols = imap pop3
    service auth {
      group = postfix
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0666
        user = postfix
      }
      unix_listener auth-userdb {
        group = postfix
        mode = 0666
        user = postfix
      }
      user = postfix
    }
    service imap-login {
      inet_listener imaps {
        port = 993
        ssl = yes
      }
    }
    service imap {
      executable = imap
    }
    ssl_cert = </etc/letsencrypt/live/mail.my-server.com/fullchain.pem
    ssl_client_ca_dir = /etc/ssl/certs
    ssl_key =  # hidden, use -P to show it
    userdb {
      driver = passwd
    }
    userdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    protocol imap {
      mail_plugins = " zlib imap_zlib"
    }
    

답변1

Debian과 같은 일부 배포판에서는 postfix가 기본적으로 chroot에서 실행됩니다. Chroot는 명백한 루트 디렉토리를 변경하므로 postfix는 사용자가 보는 것처럼 파일 시스템을 볼 수 없습니다. 이것이 /var/spool/postfix/private/auth파일이 존재하고 postfix 소유인데도 표시되지 않는 이유입니다 .

chroot 없이 postfix를 실행하려면 각 관련 항목에 대해 /etc/postfix/master.cfchroot 열을 명시적으로 설정하도록 편집하세요 n(저에게는 그게 전부입니다). 암시적 기본값을 사용하는 경우 -일부 배포판 관리자가 변경한 컴파일 기본값으로 인해 여전히 chroot를 얻을 수 있습니다.

/etc/접미사/master.cf:

# =============================================================
# service type  private unpriv  chroot  wakeup  maxproc command
#               (yes)   (yes)   (yes)   (never) (100)
# =============================================================
smtp      inet  n       -       n       -       -       smtpd

chroot 작업을 선호하는 경우 chroot용 posfix 준비 설명서를 참조하세요.BASIC_CONFIGURATION_README#chroot_setup

관련 정보