这是 doveconf -n 的输出:
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.7.2 ()
# OS: Linux 5.17.5-x86_64-linode154 x86_64 Ubuntu 20.04.4 LTS
# Hostname: mail.servicemouse.com
doveconf: Error: t_readlink(/var/run/dovecot/dovecot.conf) failed: readlink() failed: No such file or directory
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
disable_plaintext_auth = no
mail_debug = yes
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
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 {
driver = pam
}
plugin {
sieve = file:~/sieve;active=~/.dovecot.sieve
}
protocols = " imap lmtp sieve pop3 submission"
service auth {
unix_listener private/auth {
group = postfix
mode = 0660
user = postfix
}
}
ssl_cert = </etc/letsencrypt/live/<host>/fullchain.pem
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
submission_relay_host = 127.0.0.1
submission_relay_ssl = starttls
submission_relay_trusted = yes
userdb {
driver = passwd
}
以下是 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
mailbox_size_limit = 0
mydestination = $myhostname, mail.servicemouse.com, localhost.servicemouse.com, , localhost
myhostname = mail.servicemouse.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_cert_file = /etc/letsencrypt/live/mail.servicemouse.com/fullchain.pem
smtp_tls_key_file = /etc/letsencrypt/live/mail.servicemouse.com/privkey.pem
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_service = smtpd
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.servicemouse.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.servicemouse.com/privkey.pem
smtpd_tls_security_level = may
smtpd_use_tls = yes
virtual_alias_domains = site1.com, site2.com
virtual_alias_maps = hash:/etc/postfix/virtual
答案1
/var/run/dovecot/dovecot.conf) 失败:readlink() 失败:没有此文件或目录
Dovecot 未运行。它通常会将对有效配置的引用放在那里,这就是 doveconf 显示此错误的原因。
尝试启动它并查看相关日志以了解原因。
答案2
我的猜测是,您在 dovecot 配置中指定的 auth listener 的路径放在了 postfix 无法访问的位置(因为该路径必须位于 postfix 的 chroot 内) - 尝试使用绝对路径:
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
答案3
我通过编辑 10-master.conf 来运行 dovecot,并在服务身份验证下将 unix_listener 设置为 /var/spool/postfix/private/auth
答案4
我在禁用 ipv6 后遇到了这个问题。对我来说,解决方案是在 /etc/dovecot/dovecot.conf 中修改以下行:
#listen = *, ::
listen = *