Postfix 因 postini 571 退回邮件而挂起

Postfix 因 postini 571 退回邮件而挂起

我的 Postfix 服务器与 Postini 服务器的交付功能结合使用时出现问题。Postfix 开始报告以下错误:

postfix/smtp[18061]: fatal: watchdog timeout
postfix/qmgr[9746]: fatal: 69B063A536: timeout receiving delivery status from transport: smtp

经过大量时间的调试,我们发现这些消息只发生在发送到 postini 服务器 (*.psmtp.com) 的邮件中。使用 tcpdump 时,我们注意到 Postini 返回“571 消息被拒绝”消息,但该消息仅以 CR \r (0d) 结尾,而不是以 CRLF \r\n (0d0a) 结尾。由于 Postini 从未发送换行符,因此 Postfix 会一直等待消息结束。最后,看门狗进程将终止 postfix 进程并导致上述错误消息。

这会导致电子邮件停留在“活动”队列中,因此 Postfix 将尝试再次发送。这会导致 Postfix 实例不断挂起。我们尝试安装较新的 Postfix 版本(从 2.5.5 到 2.8.3),但这并没有解决问题。当然,Postini 存在问题,已向 Google 报告,但我想知道是否有解决方案让 Postfix 能够妥善处理此问题?

Postini 响应的 tcpdump:

10:31:56.889372 IP 207.126.154.12.25 > xx.xx.xx.xxx.40923: P 263:283(20) ack 13624 win 8544 <nop,nop,timestamp 1885723084 20871864>
    0x0000:  4500 0048 8faa 4000 3b06 91e1 cf7e 9a0c  E..H..@.;....~..
    0x0010:  5511 5f88 0019 9fdb 2897 59cb 02d2 3032  U._.....(.Y...02
    0x0020:  8018 2160 9d93 0000 0101 080a 7065 d9cc  ..!`........pe..
    0x0030:  013e 7ab8 3537 3120 4d65 7373 6167 6520  .>z.571.Message.
    0x0040:  5265 6675 7365 640d                      Refused.

答案1

抱歉,没有解决办法。Postfix 严格遵守 RFC 并坚持接收正确的答复。

有方法可以将回复改写为完全不同的内容,但为此必须实际回复。在您的情况下,没有回复(在 Postfix 和 RFC 5321 看来),因此发生超时。

为了完整性,这里摘录了 RFC 5321 第 2.3.0 节:

   Lines consist of zero or more data characters terminated by the
   sequence ASCII character "CR" (hex value 0D) followed immediately by
   ASCII character "LF" (hex value 0A).  This termination sequence is
   denoted as <CRLF> in this document.  Conforming implementations MUST
   NOT recognize or generate any other character or character sequence
   as a line terminator.  Limits MAY be imposed on line lengths by
   servers (see Section 4).

   In addition, the appearance of "bare" "CR" or "LF" characters in text
   (i.e., either without the other) has a long history of causing
   problems in mail implementations and applications that use the mail
   system as a tool.  SMTP client implementations MUST NOT transmit
   these characters except when they are intended as line terminators
   and then MUST, as indicated above, transmit them only as a <CRLF>
   sequence.

相关内容