Postfix с конфигурацией SASL и Dovecot 2

1287
Flock Dawson

Я пытаюсь настроить свой сервер для получения и отправки почты. Отправка почты не является проблемой, но, похоже, существует проблема с получением почты. У меня есть эта конфигурация, работающая на моем старом сервере, но теперь я перехожу на новый сервер, на котором установлен Dovecot 2, похоже, что конфигурация не работает. Я продолжаю получать следующие журналы ошибок в / var / log / syslog:

May 25 12:51:18 server postfix/smtpd[17208]: connect from localhost[::1] May 25 12:51:18 server postfix/smtpd[17208]: warning: SASL: Connect to smtpd failed: No such file or directory May 25 12:51:18 server postfix/smtpd[17208]: fatal: no SASL authentication mechanisms May 25 12:51:19 server postfix/master[17011]: warning: process /usr/lib/postfix/smtpd pid 17208 exit status 1 May 25 12:51:19 server postfix/master[17011]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling 

Вывод из dovecot -n:

# 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 ext4 auth_mechanisms = plain login base_dir = /var/run/dovecot/ first_valid_uid = 150 last_valid_uid = 150 mail_access_groups = mail mail_gid = 150 mail_location = maildir:/var/vmail/%d/%n mail_uid = 150 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-sql.conf.ext driver = sql } protocols = imap service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { group = mail mode = 0660 user = vmail } } service imap-login { executable = /usr/lib/dovecot/imap-login inet_listener imap { port = 0 } inet_listener imaps { address = * port = 993 } } service imap { executable = /usr/lib/dovecot/imap } ssl_cert = </etc/ssl/eyeducate.com/eyeducate-com.crt ssl_key = </etc/ssl/eyeducate.com/eyeducate-com.key userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lda { auth_socket_path = /var/run/dovecot/auth-master postmaster_address = postmaster@eyeducate.com sendmail_path = /usr/sbin/sendmail } protocol imap { imap_max_line_length = 64 k } 

Вывод из 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 inet_interfaces = all mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 milter_default_action = accept milter_protocol = 2 mydestination = localhost, localhost.localdomain myhostname = hera.eyeducate.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = eyeducate.com non_smtpd_milters = $smtpd_milters readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_data_restrictions = reject_unauth_pipelining, reject_multi_recipient_bounce, permit smtpd_milters = inet:localhost:8891 smtpd_recipient_restrictions = permit_mynetworks, permit_tls_all_clientcerts, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client cbl.abuseat.org, reject_rbl_client dnsbl.njabl.org, reject_rbl_client dnsbl.sorbs.net, reject_rhsbl_sender dsn.rfc-ignorant.org, check_policy_service inet:127.0.0.1:60000, permit smtpd_sasl_auth_enable = yes smtpd_sasl_exceptions_networks = $mynetworks smtpd_sasl_local_domain = $myhostname smtpd_sasl_path = smtpd smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_cert_file = /etc/ssl/eyeducate.com/eyeducate-com.crt smtpd_tls_key_file = /etc/ssl/eyeducate.com/eyeducate-com.key smtpd_tls_loglevel = 0 smtpd_tls_received_header = no smtpd_tls_security_level = may smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache smtpd_use_tls = yes tls_random_source = dev:/dev/urandom virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf virtual_gid_maps = static:8 virtual_mailbox_base = /var/vmail virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 150 virtual_transport = dovecot virtual_uid_maps = static:150 

Может ли это быть как-то связано с обновлением до Dovecot 2 (я обновил файлы конфигурации). Postfix построен с поддержкой dovecot, но я не уверен, нужно ли это компилировать по-другому для версии 2?

1

1 ответ на вопрос

2
grawity

Dovecot is configured to listen for auth requests at private/auth:

unix_listener /var/spool/postfix/private/auth 

However, you're telling Postfix to connect to an entirely different location:

smtpd_sasl_path = smtpd 

– in fact, you're (almost) telling it to send the auth requests to its own SMTP daemon, which isn't going to understand them at all, much less forward them to Dovecot.

Change the SASL socket path in Postfix to private/auth.