我看到了一些奇怪的行为并希望有人也看到了这一点。
我有一台 CentOS 服务器,运行 Postfix,为我的企业提供虚拟域。
多年来它一直运行良好,但最近突然——大约在 2021 年 2 月 17 日——我发现我错过了人们发给我的某些电子邮件。
经过深入研究后,发现似乎只有当有人从他们的虚拟域发送到我的虚拟域时才会发生这种情况。
我很茫然,任何建议都很好。
以下是有关我的配置和我所看到的内容的更多信息。
虚拟用户表用于接受各种域和这些域中的各种用户。这些都转发到 Gmail 帐户,即
去
帮我的朋友在三家不同的 ISP 上拥有三个不同的帐户。其中两个帐户有他自己的业务域名,一个只是基本的 ISP 帐户。即
如果他向我的公司地址发送电子邮件[电子邮件保护]从这三个帐户中,在我的服务器上的邮件日志中,我看到了相同的三件事。我看到我的 Postfix 接受了他的电子邮件,我看到电子邮件重新排队等待发送给 Google,我看到电子邮件已发送给 Google。我看到了这三封邮件中的每一封。
奇怪的是,只有[电子邮件保护]消息确实出现在我的 Gmail 收件箱中。
值得一提的是,我发现我的许多客户都有类似的行为,即他们在向我的公司地址发送电子邮件时遇到了麻烦,而当他们使用我的“裸” Gmail 地址或使用他们的个人电子邮件时,我就可以顺利收到邮件。
欢迎任何想法、建议和创意。我真的很困惑。多年来,配置一直运行良好。我最好的猜测是,Google 现在正在检查他们以前没有做过的事情,我需要更新邮件配置中的某些内容……这种虚拟域中继非常常见,所以我一定是错过了什么,或者现在需要新的合规性。
提前感谢你的帮助!
编辑:这些电子邮件不在垃圾邮件或任何其他随机标签中,例如促销。我查看了这些地方,还搜索了它们是否可能被藏在收件箱以外的其他地方,但无济于事。
编辑2:来自邮件日志的混淆片段显示对我的虚拟地址进行了三次测试,所有三次测试都被发送到Google,但实际上只有一个出现在我的文件夹中。
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: connect from mail-mw2nam10on2139.outbound.protection.outlook.com[40.107.94.139]
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: setting up TLS connection from mail-mw2nam10on2139.outbound.protection.outlook.com[40.107.94.139]
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: Anonymous TLS connection established from mail-mw2nam10on2139.outbound.protection.outlook.com[40.107.94.139]: TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: 9AA2A203F8: client=mail-mw2nam10on2139.outbound.protection.outlook.com[40.107.94.139]
Feb 26 14:54:01 syd-barrett postfix/cleanup[7735]: 9AA2A203F8: message-id=<[email protected]>
Feb 26 14:54:01 syd-barrett postfix/qmgr[7647]: 9AA2A203F8: from=<[email protected]>, size=10572, nrcpt=1 (queue active)
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: warning: network_biopair_interop: error writing 44 bytes to the network: Connection reset by peer
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: warning: network_biopair_interop: error writing 31 bytes to the network: Broken pipe
Feb 26 14:54:01 syd-barrett postfix/smtpd[7732]: disconnect from mail-mw2nam10on2139.outbound.protection.outlook.com[40.107.94.139]
Feb 26 14:54:02 syd-barrett postfix/smtpd[7738]: connect from localhost.localdomain[127.0.0.1]
Feb 26 14:54:02 syd-barrett postfix/smtpd[7738]: E544422465: client=localhost.localdomain[127.0.0.1]
Feb 26 14:54:02 syd-barrett postfix/cleanup[7735]: E544422465: message-id=<[email protected]>
Feb 26 14:54:02 syd-barrett postfix/qmgr[7647]: E544422465: from=<[email protected]>, size=11025, nrcpt=1 (queue active)
Feb 26 14:54:02 syd-barrett postfix/smtpd[7738]: disconnect from localhost.localdomain[127.0.0.1]
Feb 26 14:54:02 syd-barrett amavis[6636]: (06636-07) Passed CLEAN {RelayedOpenRelay}, [40.107.94.139]:51936 [40.107.94.139] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: WWCNTFsH0GOS, Hits: -1.801, size: 10565, queued_as: E544422465, dkim_sd=selector2-friendcompanyA-onmicrosoft-com:friendcompanyA.onmicrosoft.com, 1272 ms
Feb 26 14:54:02 syd-barrett postfix/smtp[7736]: 9AA2A203F8: to=<[email protected]>, orig_to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.4, delays=0.07/0.02/0/1.3, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E544422465)
Feb 26 14:54:02 syd-barrett postfix/qmgr[7647]: 9AA2A203F8: removed
Feb 26 14:54:02 syd-barrett postfix/smtp[7739]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c09::1a]:25: Network is unreachable
Feb 26 14:54:03 syd-barrett postfix/smtp[7739]: setting up TLS connection to gmail-smtp-in.l.google.com[74.125.195.26]:25
Feb 26 14:54:03 syd-barrett postfix/smtp[7739]: Trusted TLS connection established to gmail-smtp-in.l.google.com[74.125.195.26]:25: TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)
Feb 26 14:54:03 syd-barrett postfix/smtp[7739]: E544422465: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.195.26]:25, delay=0.93, delays=0.01/0.04/0.13/0.75, dsn=2.0.0, status=sent (250 2.0.0 OK 1614351180 y17si9268983plh.394 - gsmtp)
Feb 26 14:54:03 syd-barrett postfix/qmgr[7647]: E544422465: removed
Feb 26 14:54:53 syd-barrett postfix/smtpd[7732]: connect from mail-bn7nam10on2131.outbound.protection.outlook.com[40.107.92.131]
Feb 26 14:54:53 syd-barrett postfix/smtpd[7732]: setting up TLS connection from mail-bn7nam10on2131.outbound.protection.outlook.com[40.107.92.131]
Feb 26 14:54:54 syd-barrett postfix/smtpd[7732]: Anonymous TLS connection established from mail-bn7nam10on2131.outbound.protection.outlook.com[40.107.92.131]: TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)
Feb 26 14:54:54 syd-barrett postfix/smtpd[7732]: 43D46203F8: client=mail-bn7nam10on2131.outbound.protection.outlook.com[40.107.92.131]
Feb 26 14:54:54 syd-barrett postfix/cleanup[7735]: 43D46203F8: message-id=<[email protected]>
Feb 26 14:54:54 syd-barrett postfix/qmgr[7647]: 43D46203F8: from=<[email protected]>, size=10836, nrcpt=1 (queue active)
Feb 26 14:54:54 syd-barrett postfix/smtpd[7732]: warning: network_biopair_interop: error writing 44 bytes to the network: Connection reset by peer
Feb 26 14:54:54 syd-barrett postfix/smtpd[7732]: warning: network_biopair_interop: error writing 31 bytes to the network: Broken pipe
Feb 26 14:54:54 syd-barrett postfix/smtpd[7732]: disconnect from mail-bn7nam10on2131.outbound.protection.outlook.com[40.107.92.131]
Feb 26 14:54:55 syd-barrett postfix/smtpd[7738]: connect from localhost.localdomain[127.0.0.1]
Feb 26 14:54:55 syd-barrett postfix/smtpd[7738]: E1D8722465: client=localhost.localdomain[127.0.0.1]
Feb 26 14:54:55 syd-barrett postfix/cleanup[7735]: E1D8722465: message-id=<[email protected]>
Feb 26 14:54:55 syd-barrett postfix/qmgr[7647]: E1D8722465: from=<[email protected]>, size=11289, nrcpt=1 (queue active)
Feb 26 14:54:55 syd-barrett postfix/smtpd[7738]: disconnect from localhost.localdomain[127.0.0.1]
Feb 26 14:54:55 syd-barrett postfix/smtp[7739]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c09::1a]:25: Network is unreachable
Feb 26 14:54:55 syd-barrett amavis[5574]: (05574-12) Passed CLEAN {RelayedOpenRelay}, [40.107.92.131]:15723 [40.107.92.131] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: WHaVv9MpPDf0, Hits: -1.901, size: 10829, queued_as: E1D8722465, dkim_sd=selector2-friendcompanyBcom-onmicrosoft-com:friendcompanyBcom.onmicrosoft.com, 1370 ms
Feb 26 14:54:55 syd-barrett postfix/smtp[7736]: 43D46203F8: to=<[email protected]>, orig_to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.7, delays=0.32/0/0/1.4, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E1D8722465)
Feb 26 14:54:55 syd-barrett postfix/qmgr[7647]: 43D46203F8: removed
Feb 26 14:54:56 syd-barrett postfix/smtp[7739]: setting up TLS connection to gmail-smtp-in.l.google.com[74.125.195.26]:25
Feb 26 14:54:56 syd-barrett postfix/smtp[7739]: Trusted TLS connection established to gmail-smtp-in.l.google.com[74.125.195.26]:25: TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)
Feb 26 14:54:56 syd-barrett postfix/smtp[7739]: E1D8722465: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.195.26]:25, delay=0.54, delays=0.01/0/0.13/0.4, dsn=2.0.0, status=sent (250 2.0.0 OK 1614351232 u11si8933302pgj.302 - gsmtp)
Feb 26 14:54:56 syd-barrett postfix/qmgr[7647]: E1D8722465: removed
Feb 26 15:00:59 syd-barrett postfix/anvil[7728]: statistics: max cache size 2 at Feb 26 14:54:01
Feb 26 14:55:27 syd-barrett postfix/smtpd[7732]: connect from resqmta-po-02v.sys.comcast.net[96.114.154.161]
Feb 26 14:55:27 syd-barrett postfix/smtpd[7732]: setting up TLS connection from resqmta-po-02v.sys.comcast.net[96.114.154.161]
Feb 26 14:55:27 syd-barrett postfix/smtpd[7732]: Anonymous TLS connection established from resqmta-po-02v.sys.comcast.net[96.114.154.161]: TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Feb 26 14:55:27 syd-barrett postfix/smtpd[7732]: 9985D203F8: client=resqmta-po-02v.sys.comcast.net[96.114.154.161]
Feb 26 14:55:27 syd-barrett postfix/cleanup[7735]: 9985D203F8: message-id=<[email protected]>
Feb 26 14:55:27 syd-barrett postfix/qmgr[7647]: 9985D203F8: from=<[email protected]>, size=4953, nrcpt=1 (queue active)
Feb 26 14:55:28 syd-barrett postfix/smtpd[7738]: connect from localhost.localdomain[127.0.0.1]
Feb 26 14:55:28 syd-barrett postfix/smtpd[7738]: DF9A122479: client=localhost.localdomain[127.0.0.1]
Feb 26 14:55:28 syd-barrett postfix/cleanup[7735]: DF9A122479: message-id=<[email protected]>
Feb 26 14:55:28 syd-barrett postfix/qmgr[7647]: DF9A122479: from=<[email protected]>, size=5406, nrcpt=1 (queue active)
Feb 26 14:55:28 syd-barrett postfix/smtpd[7738]: disconnect from localhost.localdomain[127.0.0.1]
Feb 26 14:55:28 syd-barrett postfix/smtp[7739]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c09::1a]:25: Network is unreachable
Feb 26 14:55:28 syd-barrett amavis[6636]: (06636-08) Passed CLEAN {RelayedOpenRelay}, [96.114.154.161]:32912 [67.170.123.168] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: PzSxJQ1_ttxt, Hits: -3.781, size: 4952, queued_as: DF9A122479, dkim_sd=20190202a:comcast.net, 1240 ms
Feb 26 14:55:28 syd-barrett postfix/smtp[7736]: 9985D203F8: to=<[email protected]>, orig_to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.3, delays=0.09/0/0/1.2, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as DF9A122479)
Feb 26 14:55:28 syd-barrett postfix/qmgr[7647]: 9985D203F8: removed
Feb 26 14:55:28 syd-barrett postfix/smtp[7739]: setting up TLS connection to gmail-smtp-in.l.google.com[74.125.195.26]:25
Feb 26 14:55:28 syd-barrett postfix/smtp[7739]: Trusted TLS connection established to gmail-smtp-in.l.google.com[74.125.195.26]:25: TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)
Feb 26 14:55:29 syd-barrett postfix/smtp[7739]: DF9A122479: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.195.26]:25, delay=0.38, delays=0.01/0/0.1/0.28, dsn=2.0.0, status=sent (250 2.0.0 OK 1614351265 o15si7640511pgu.280 - gsmtp)
Feb 26 14:55:29 syd-barrett postfix/qmgr[7647]: DF9A122479: removed
答案1
我相信我已经解决了这个问题,显然这是一个已知的问题,虚拟别名转发到谷歌,谷歌可能会看到转发,查看原始发件人,看到转发的电子邮件来自原始发送域的 SPF 列表中没有的服务器,并默默地处理电子邮件,永远不会被看到。
明显的解决方案是使用 SRS,以便 Google 将电子邮件视为从转发服务器发送,并检查转发域的 SPF。
我之所以说显而易见,是因为 A)该解决方案只实施了很短的时间,而且 B)因为我无法在该系统上启用 SRS,所以我最终构建了一个新的邮件服务器,并且在构建过程中,确保 SPF、DKIM、DMARC 都已配置,然后还添加了 SRS 的代码。