我有第二个 Postfix 实例,但无法连接到 dovecot-lmtp 套接字。在主 Postfix 实例中一切正常,但对于辅助实例,我在日志中看到以下信息:
连接到 [MYHOSTNAME].mail.ubuntu.loc[private/dovecot-lmtp]: 没有这样的火或目录
当然,我可以将 [MYHOSTNAME].mail.ubuntu.loc 的 IP 添加到 /etc/hosts 中,并且应该可以工作,但为什么在第二个 postfix 实例中将 [MYHOSTNAME] 添加到 mail.ubuntu.loc 中?
main.cf:[后缀的第二个实例]
compatibility_level = 2
data_directory = /var/lib/postfix-www
mydomain = mail.ubuntu.loc
myorigin = $mydomain
inet_interfaces = localhost, 192.168.1.19
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8
append_dot_mydomain = yes
biff = no
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
readme_directory = no
inet_protocols = ipv4
master_service_disable =
authorized_submit_users =
queue_directory = /var/spool/postfix-www
multi_instance_name = postfix-www
multi_instance_enable = yes
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_maps = hash:/etc/postfix-www/virtual_mailbox_maps
virtual_mailbox_domains = ubuntu.loc
虽然我在检查配置时添加了“mydomain = mail.ubuntu.loc”:
$ postconf -c /etc/postfix-www/ | grep mydomain
我看到:mydomain = [MYHOSTNAME].mail.ubuntu.loc
好的...我的错误应该是 myhostname = mail.ubuntu.loc 而不是“mydomain”选项。但这个问题仍然存在问题:
connect to mail.ubuntu.loc[private/dovecot-lmtp]: No such file or directory
答案1
好的,我想我已经解决了这个问题。辅助实例无法连接到 lmtp 套接字,因为主 Postfix 使用它...我认为是这样,这就是为什么我为辅助 Postfix 实例设置 inet 连接的原因:
dovecot.conf:
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
user = postfix
group = postfix
mode = 0660
}
inet_listener lmtp {
address = 127.0.0.1 ::1
port = 24
}
}
主文件:
virtual_transport = lmtp:127.0.0.1:24