我注意到,对于无法通过 postfix 传递的邮件,邮件正文会被删除。以下是示例(真实电子邮件被临时电子邮件替换):
--5F54EFCA0A.1653443634/MYDOMAIN.COM
Content-Description: Delivery report
Content-Type: message/delivery-status
Reporting-MTA: dns; MYDOMAIN.COM
X-Postfix-Queue-ID: 5F54EFCA0A
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Wed, 25 May 2022 01:47:13 +0000 (UTC)
Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: delayed
Status: 4.2.1
Remote-MTA: dns; alt1.gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 450-4.2.1 The user you are trying to contact is
receiving mail at a rate that 450-4.2.1 prevents additional messages from
being delivered. Please resend your 450-4.2.1 message at a later time. If
the user is able to receive mail at that 450-4.2.1 time, your message will
be delivered. For more information, please 450-4.2.1 visit 450 4.2.1
https://support.google.com/mail/?p=ReceivingRate
i9-20020a544089000000b0032b06b69e67si10079646oii.275 - gsmtp
Will-Retry-Until: Mon, 30 May 2022 01:47:13 +0000 (UTC)
--5F54EFCA0A.1653443634/MYDOMAIN.COM
Content-Description: Undelivered Message Headers
Content-Type: text/rfc822-headers
Content-Transfer-Encoding: 8bit
Return-Path: <[email protected]>
Received: from [XX.XX.XX.XX] (localhost [127.0.0.1])
by MYDOMAIN.COM (Postfix) with ESMTP id 5F54EFCA0A
for <[email protected]>; Wed, 25 May 2022 01:47:13 +0000 (UTC)
Content-Type: multipart/mixed; boundary="===============9070788644322080819=="
MIME-Version: 1.0
Subject: MY SUBJECT
From: [email protected]
To: [email protected]
Message-Id: <[email protected]>
Date: Wed, 25 May 2022 01:47:13 +0000 (UTC)
--5F54EFCA0A.1653443634/MYDOMAIN.COM--
*** HEADER EXTRACTED deferred/3/3E377FD67F ***
named_attribute: encoding=8bit
*** MESSAGE FILE END deferred/3/3E377FD67F ***
我想知道以下选项是否可行?只是想找到一种方法来避免在发生退回时丢失原始消息。
- 有没有办法阻止 Postfix 生成此消息,而是将原始消息放在延迟队列中?
- 或者,我可以改变它删除原始消息并用该消息替换它的速度吗?
- 或者,有没有办法自定义格式以确保包含原始邮件的正文内容?
答案1
该消息不一定无法送达,只是未送达。它未被 Google 接受然而。可能如前所述,“稍后”。我认为这种混淆源于“弹跳”被普遍理解为“无法投递,已全额退回”。
但此示例只是关于延迟,如主题和所示Action: delayed
。这些通知故意只参考原始消息:如果永久被拒绝,或仍未在 指定的时间内送达Will-Retry-Until
。
只是试图找到一种方法来避免在发生退回时丢失原始消息。
信息是不是丢失的。
- 后缀有按原样将此消息排队,包括正文。随附的代码
X-Postfix-Queue-ID: 5F54EFCA0A
是队列文件的名称。使用postcat(1)
命令管理员可以检索它,包括正文-直到交付或返回。 - 您可以配置
delay_warning_time
稍后再警告延误(或根本不警告)。不是如果您的用户确实了解并使用延迟通知,请禁用此功能。 - 您可以配置
maximal_queue_lifetime
定义 Postfix 在遇到临时错误时应尝试重试传递多长时间。我不是建议改变这一点。