Re: [ietf-smtp] CHUNKING and PIPELINING

Viktor Dukhovni <ietf-dane@dukhovni.org> Sun, 07 March 2021 20:14 UTC

Return-Path: <ietf-dane@dukhovni.org>
X-Original-To: ietf-smtp@ietfa.amsl.com
Delivered-To: ietf-smtp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7E1B23A1C1B for <ietf-smtp@ietfa.amsl.com>; Sun, 7 Mar 2021 12:14:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XRB2DnCAacgH for <ietf-smtp@ietfa.amsl.com>; Sun, 7 Mar 2021 12:14:13 -0800 (PST)
Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DBD0B3A1C19 for <ietf-smtp@ietf.org>; Sun, 7 Mar 2021 12:14:13 -0800 (PST)
Received: from [192.168.1.175] (unknown [192.168.1.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by straasha.imrryr.org (Postfix) with ESMTPSA id A36F2C8B9A for <ietf-smtp@ietf.org>; Sun, 7 Mar 2021 15:14:11 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
In-Reply-To: <01RWCSPP4820005PTU@mauve.mrochek.com>
Date: Sun, 07 Mar 2021 15:14:10 -0500
Content-Transfer-Encoding: 7bit
Reply-To: ietf-smtp@ietf.org
Message-Id: <1AFA5DBF-325F-4943-BBE3-45311CC485CA@dukhovni.org>
References: <b1202e49-26b2-35d8-0db7-bb94acd0d52f@wizmail.org> <01RWCSPP4820005PTU@mauve.mrochek.com>
To: ietf-smtp@ietf.org
X-Mailer: Apple Mail (2.3654.60.0.2.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf-smtp/G5FPVHKMpeD6FKDz8vBVT9-khbE>
Subject: Re: [ietf-smtp] CHUNKING and PIPELINING
X-BeenThere: ietf-smtp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion of issues related to Simple Mail Transfer Protocol \(SMTP\) \[RFC 821, RFC 2821, RFC 5321\]" <ietf-smtp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf-smtp/>
List-Post: <mailto:ietf-smtp@ietf.org>
List-Help: <mailto:ietf-smtp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-smtp>, <mailto:ietf-smtp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 07 Mar 2021 20:14:16 -0000


> On Mar 6, 2021, at 7:58 PM, Ned Freed <ned.freed@mrochek.com> wrote:
> 
>> Is is permitted to pipeline a QUIT after a BDAT LAST?
> 
> RFC 5321 section 4.1.1.10 is quite clear that QUIT can be issued at
> any time. The state of the connection doesn't matter. 
> So yes, a QUIT can be pipelined after BDAT LAST. It doesn't matter
> if the BDAT succeeds or fails.

Are you sure about that?  For example, PIPELINING of QUIT with
"DATA" would often not have the intended effect. :-)

With PIPELINING, the client needs to wait for all the server replies
after EHLO, DATA, VRFY, EXPN, TURN, QUIT, and NOOP:

	https://tools.ietf.org/html/rfc2920#section-3.1

before sending further commands.  So the question is where "BDAT LAST"
fits into the picture.

> 
>> RFC 3030 (SMTP Service Extensions
>>           for Transmission of Large
>>           and Binary MIME Messages)
>> does not say whether or not BDAT LAST is a synch point per
>> RFC 2929 (SMTP Service Extension for Command Pipelining).
> 
> That would only matter if there were restrictions on when QUIT can
> be sent.

But there are such restrictions, it must not be sent pipelined with
any of the list above (admittedly sending QUIT again after QUIT is
rather redundant).

What Jeremy did not mention is that he's seeing interoperability
issues (reportedly with Google and IIRC Yahoo) when pipelining
"BDAT nnnn LAST<CRLF>QUIT<CRLF>".

Did Google, et. al. not implement PIPELINING for BDAT correctly?
It is not (to me) entirely obvious from the spec.  The PIPELING
semantics should have been spelled out more clearly in 3030.

-- 
	Viktor.