问题原文
原帖链接 · markus · CC BY-SA 3.0
I've setup postfix, dovecot and roundcube. receiving and sending email via roundcube is working as well as receiving emails via imap with another email client.
But I'm not able to send emails with an external email client. As soon as I connect, I see:
postfix/smtpd[1258]: warning: SASL: Connect to private/auth failed: No such file or directory
postfix/smtpd[1258]: fatal: no SASL authentication mechanisms
in mail.log.
here my dovecot config:
dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.6
mail_location = mbox:~/mail:INBOX=/var/mail/%u
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
driver = sql
}
protocols = imap pop3
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
here my postfix config:
postconf -n
alias_database = hash:/etc/aliases
alias_maps = pgsql:/etc/postfix/pgsql-aliases.cf
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
default_transport = error
dovecot_destination_recipient_limit = 1
html_directory = /usr/share/doc/postfix/html
inet_interfaces = 127.0.0.1, 192.168.1.134
inet_protocols = ipv4
local_recipient_maps = $virtual_mailbox_maps
local_transport = virtual
mailbox_size_limit = 0
mydestination = localhost
myhostname = vocdemosvr01.voxtelo.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relay_domains = proxy:pgsql:/etc/postfix/pgsql/relay_domains.cf
relay_transport = error
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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:pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf
virtual_gid_maps = static:12
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:pgsql:/etc/postfix/pgsql/virtual_domains_maps.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
virtual_minimum_uid = 8
virtual_transport = dovecot
virtual_uid_maps = static:8
voxdemosvr01:/var/spool/postfix/private#
Which configuration do I need to check?
社区高分解答
原帖链接 · Cross · CC BY-SA 3.0
After spending some hours trying to figure out this, I finally fixed my problem, hope this helps to others...
In the postfix/main.cf file you have something like:
smtpd_sasl_path = private/auth
and in the dovecot/conf.d/10-master.conf you have something like:
service auth {
# auth_socket_path points to this userdb socket by default. It's typically
# used by dovecot-lda, doveadm, possibly imap process, etc. Its default
# permissions make it readable only by root, but you may need to relax these
# permissions. Users that have access to this socket are able to get a list
# of all usernames and get results of everyone's userdb lookups.
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
...
in my case the "private/auth" in the first file was not matching the unix_listener path, as soon as I put this one equal to the first it solved the problem. My guess is that the smtpd_sasl_path has to be the same as the /var/spool/postfix/... otherwise it will fail.
Hope this helps,
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
