mar*_*kus 9 postfix dovecot roundcube
我已经设置了 postfix、dovecot 和 roundcube。通过 roundcube 接收和发送电子邮件以及通过 imap 与另一个电子邮件客户端接收电子邮件一样有效。
但我无法使用外部电子邮件客户端发送电子邮件。一旦我连接,我就会看到:
postfix/smtpd[1258]: warning: SASL: Connect to private/auth failed: No such file or directory
postfix/smtpd[1258]: fatal: no SASL authentication mechanisms
Run Code Online (Sandbox Code Playgroud)
在邮件日志中。
这是我的 dovecot 配置:
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
}
Run Code Online (Sandbox Code Playgroud)
这是我的后缀配置:
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#
Run Code Online (Sandbox Code Playgroud)
我需要检查哪些配置?
小智 11
查看
/etc/dovecot/conf.d/10-master.conf
Run Code Online (Sandbox Code Playgroud)
对于线
unix_listener private/auth
Run Code Online (Sandbox Code Playgroud)
将其更改为
unix_listener /var/spool/postfix/private/auth
Run Code Online (Sandbox Code Playgroud)
重新启动 dovecot 并重试。如果仍然不起作用,请发布dovecot -n和的输出postfix -n
小智 8
花了几个小时试图弄清楚这一点后,我终于解决了我的问题,希望这对其他人有帮助......
在 postfix/main.cf 文件中,您有类似的内容:
smtpd_sasl_path = private/auth
Run Code Online (Sandbox Code Playgroud)
在 dovecot/conf.d/10-master.conf 你有这样的东西:
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
}
...
Run Code Online (Sandbox Code Playgroud)
在我的情况下,第一个文件中的“private/auth”与 unix_listener 路径不匹配,只要我把这个与第一个相同,它就解决了问题。我的猜测是 smtpd_sasl_path 必须与 /var/spool/postfix/... 相同,否则它将失败。
希望这可以帮助,
| 归档时间: |
|
| 查看次数: |
26957 次 |
| 最近记录: |