SMTP 的哪些实现通常会处理邮件数据以响应 DATA 之后的 RSET?

What implementations of SMTP typically do with the mail data in response to RSET after DATA?

这是我从 RFC 5321 收集的内容:

4.1.1.5. RESET (RSET)

This command specifies that the current mail transaction will be aborted. Any stored sender, recipients, and mail data MUST be discarded, and all buffers and state tables cleared. The receiver MUST send a "250 OK" reply to a RSET command with no arguments. A reset command may be issued by the client at any time. It is effectively equivalent to a NOOP (i.e., it has no effect) if issued immediately after EHLO, before EHLO is issued in the session, after an end of data indicator has been sent and acknowledged, or immediately before a QUIT.

重点是我的。这表示如果我们在数据指示符“.”结束之后收到 RSET,但在我们发送确认之前,那么我们必须丢弃当前正在传递的消息内容。这似乎不切实际。此外,服务器可以很容易地表现得好像它在发送确认后收到了 RSET - 客户端将无法知道。想知道通常做什么,我发现这个讨论 https://www.ietf.org/mail-archive/web/ietf-smtp/current/msg00946.html 他们说:

Under a RFC5321 compliant "No Quit/Mail" cancellation implementation, after
completing the DATA state, the server is waiting for a pending RSET, MAIL
or QUIT command:

    QUIT - complete transaction, if any
    MAIL - complete transaction, if any
          perform a "reset"
    RSET - cancel any pending DATA transaction delivery,
          perform a "reset"
    drop - cancel any pending DATA transaction delivery

We added this support in 2008 as a local policy option (EnableNoQuitCancel)
which will alter your SMTP state flow, your optimization and now you MUST 
follow RSET vs QUIT/MAIL correctly. RSET (after DATA) aborts the
transaction, QUIT/MAIL (after DATA) does not. RSET is not an NOOP at this 
point.

规范说丢弃是必须的。然而,上述摘录表明在实践中它被解释为 MAY。我可以查看 SMTP/LMTP 的已知实现的代码,例如 Dovecot,但也许有人已经看过它,这会节省我的时间。

答案在这里:https://www.rfc-editor.org/rfc/rfc1047。他们基本上说您可以在开始处理之前确认,实际上建议您这样做。这并不违反 RFC 5321。当然,有关此问题的更多信息会很有用,但我对 rfc1047 很满意。

文本显示"end of data indicator has been sent and acknowledged",这表明客户端已经收到服务器对DATA命令的响应。由于基本协议不支持命令流水线,我不认为在 DATA 之后但在服务器响应之前发送任何内容(在终止 DATA 的点之后但在收到服务器回复之前) 是明确定义的行为。

就个人而言,我想不出比 "pretend it didn't happen."

更合理的服务器行为