Postfix - 当配置为接收多个邮件时,仅接收一个域的邮件

Postfix - 当配置为接收多个邮件时,仅接收一个域的邮件

我已将 postfix 设置为接收三个域 example.net 和 example.com 的邮件。我已将此设置设置为别名,每个域都有一个 info@ 地址,这两个地址都发送给本地用户 Jason。DNS 配置正确,并且两个域的邮件内容相同。

当我使用 tail 跟踪 /var/log/mail.log 时,以我的个人 gmail 帐户结尾进行测试时,我完全看不到 example.com 的活动,但我确实看到了 example.net 的活动。

当 example.net 收到消息时,mail.log 中的段落:

Jul  3 18:54:25 mail postfix/smtpd[31644]: connect from mail-qt0-f181.google.com[209.85.216.181]
Jul  3 18:54:25 mail postfix/smtpd[31644]: Anonymous TLS connection established from mail-qt0-f181.google.com[209.85.216.181]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jul  3 18:54:25 mail postfix/smtpd[31644]: 33009142FF0: client=mail-qt0-f181.google.com[209.85.216.181]
Jul  3 18:54:25 mail postfix/cleanup[31648]: 33009142FF0: message-id=<CAHsLCMmNCoZU0N0gFw28Yzm9HLpiCYOPyEwaBHq4ALQtSt2ssw@mail.gmail.com>
Jul  3 18:54:25 mail postfix/qmgr[31108]: 33009142FF0: from=<[email protected]>, size=2590, nrcpt=1 (queue active)
Jul  3 18:54:25 mail postfix/smtpd[31644]: disconnect from mail-qt0-f181.google.com[209.85.216.181]
Jul  3 18:54:25 mail postfix/lmtp[31650]: 33009142FF0: to=<[email protected]>, orig_to=<[email protected]>, relay=example.net[/var/run/cyrus/socket/lmtp], delay=0.18, delays=0.15/0/0.01/0.01, dsn=2.1.5, status=sent (250 2.1.5 Ok SESSIONID=<cyrus-31651-1467586465-1>)
Jul  3 18:54:25 mail postfix/qmgr[31108]: 33009142FF0: removed

然而过了一会儿,日志中也出现了这样的信息:

Jul  3 19:02:51 mail postfix/qmgr[31108]: 8D183142FFD: from=<[email protected]>, size=2662, nrcpt=1 (queue active)
Jul  3 19:03:21 mail postfix/smtp[31706]: connect to localhost.localdomain[104.239.213.7]:25: Connection timed out
Jul  3 19:03:51 mail postfix/smtp[31706]: connect to localhost.localdomain[198.105.244.11]:25: Connection timed out
Jul  3 19:03:51 mail postfix/smtp[31706]: 8D183142FFD: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=11281, delays=11221/0.01/60/0, dsn=4.4.1, status=deferred (connect to localhost.localdomain[172.16.1.5]:25: Connection timed out)

为什么它尝试连接到 localhost.localdomain,而它似乎正在解析我网络上的其他 IP?

postconf -n 的输出

broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Mail/
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
milter_default_action = accept
milter_protocol = 2
mydestination = example.net, example.com
myhostname = example.net
non_smtpd_milters = inet:localhost:8891
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtpd_milters = inet:localhost:8891
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_reject_unlisted_sender = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = cyrus
smtpd_tls_cert_file = /etc/ssl/certs/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
virtual_alias_maps = hash:/etc/postfix/virtual

答案1

Jul  3 19:03:51 [...] connect to **localhost.localdomain[172.16.1.5]**:25:
Connection timed out) 

看起来这里有些奇怪... localhost.localdomain 应该保留为 127.0.0.1,而不是您所引用的 172.16.1.5。

尝试修复此问题并查看有何变化。

相关内容