Re: [yam] Mail Data termination

Sabahattin Gucukoglu <mail@sabahattin-gucukoglu.com> Wed, 17 August 2011 02:01 UTC

Return-Path: <mail@sabahattin-gucukoglu.com>
X-Original-To: yam@ietfa.amsl.com
Delivered-To: yam@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 80C3C5E8006 for <yam@ietfa.amsl.com>; Tue, 16 Aug 2011 19:01:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.123
X-Spam-Level:
X-Spam-Status: No, score=-1.123 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, FH_HOST_EQ_D_D_D_D=0.765, HOST_MISMATCH_COM=0.311, J_CHICKENPOX_44=0.6, RDNS_DYNAMIC=0.1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HzDi9iU54USG for <yam@ietfa.amsl.com>; Tue, 16 Aug 2011 19:01:50 -0700 (PDT)
Received: from Mintaka.sabahattin-gucukoglu.com (sgucukoglu-2-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:7ef::2]) by ietfa.amsl.com (Postfix) with ESMTP id 7BB1B21F8A71 for <yam@ietf.org>; Tue, 16 Aug 2011 19:01:50 -0700 (PDT)
Received: from Mintaka.sabahattin-gucukoglu.com ([::ffff:127.0.0.1]:58259) by Mintaka.sabahattin-gucukoglu.com with [XMail 1.27 ESMTP Server] id <S3A270> for <yam@ietf.org> from <mail@sabahattin-gucukoglu.com>; Wed, 17 Aug 2011 03:02:39 +0100
Received: from [192.168.1.8] (host213-123-192-30.in-addr.btopenworld.com [213.123.192.30]) (using SMTP over TLS) by Mintaka.sabahattin-gucukoglu.com (tmda-ofmipd) with ESMTP; Wed, 17 Aug 2011 03:02:37 +0100
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Apple Message framework v1084)
In-Reply-To: <4E4B0960.6090700@santronics.com>
Date: Wed, 17 Aug 2011 03:02:36 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <80EA1FFD-0815-4F42-B2A5-989ECE94827B@sabahattin-gucukoglu.com>
References: <4E4AA3DD.6060308@santronics.com> <p06240602ca706b214ff7@loud.pensive.org> <7381BE04-45B7-4C67-B267-02878A6BB729@network-heretics.com> <62C5526E-8A30-4109-B42C-7E6E3B45B9FC@network-heretics.com> <6.2.5.6.2.20110816153433.0b3594f8@resistor.net> <4E4B01C6.8070005@santronics.com> <AA383F4C-5B6F-4174-B682-0E5A67FF5975@network-heretics.com> <4E4B0960.6090700@santronics.com>
To: yam@ietf.org
X-Mailer: Apple Mail (2.1084)
X-Delivery-Agent: TMDA/1.1.12-kg3 (Haumea)
From: Sabahattin Gucukoglu <mail@sabahattin-gucukoglu.com>
X-Primary-Address: mail@sabahattin-gucukoglu.com
Subject: Re: [yam] Mail Data termination
X-BeenThere: yam@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: Sabahattin Gucukoglu <mail-dated-1316138559.488d19@sabahattin-gucukoglu.com>
List-Id: Yet Another Mail working group discussion list <yam.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yam>, <mailto:yam-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/yam>
List-Post: <mailto:yam@ietf.org>
List-Help: <mailto:yam-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yam>, <mailto:yam-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Aug 2011 02:01:53 -0000

On 17 Aug 2011, at 01:20, Hector Santos wrote:
> IMTO, no matter how you wish read this, NO QUIT means a cancellation because otherwise the only other way to end a SMTP session is for the client to close the socket connection. So what this would indirectly suggest the SMTP specs implicitly says:

How did you get there from here?

>   There is two ways for a client to end a SMTP session:
>   QUIT or DROP THE LINE

Which is absolutely true.  Both end the session.  One does it politely and correctly.  The other does it rudely (MUST NOT, it's bad manners) and incorrectly.  The intent is to benefit servers, but a server would not be robust to fail in the absence of QUIT.

FWIW: Postfix still offers a choice of whether or not to wait for the response to QUIT and the TCP close from the other end before closing itself.  The default is do not wait, because Postfix recognises the simple truth that implementations process events in the order they were buffered, which means that the action of responding to QUIT will result in the closure by the server of the connection anyway before any further attempt is made to read from the socket for an end-of-file condition.

> and that does not jive with the written words:
> 
>   The sender MUST NOT intentionally close the transmission
>   channel until it sends a QUIT command,
> 
> I can understood your position, very clearly, but in general, I don't think this is a good way to do robust client/server communications (allowing drops to signal message transaction completion). It opens the door for unsureness.

How did you get here from there? :-)

I think you've jumped a conclusion somewhere.  Only end-of-data indicates message completion.  Closure of the connection would mean the transaction was aborted.  Reset would mean transaction was aborted.  QUIT would mean transaction was aborted.  Any action causing the SMTP interaction to cease - either of QUIT or TCP close, timeout, fail - would mean session was over.

What do you do when MAIL is issued following end-of-data - submit the outstanding job, or queue it for QUIT?  Neither is correct, of course ...

> Keith Moore wrote:
>> On Aug 16, 2011, at 7:48 PM, Hector Santos wrote:
>>> SM wrote:
>>>> At 15:03 16-08-2011, Keith Moore wrote:
>>>>> sorry, I misunderstood what was being suggested.   if the server gets DATA followed by a message (or a message fragment) followed by CRLF.CRLF, it should accept the message (or fragment) and deliver it.  no matter what else follows, or doesn't follow, during the same SMTP session .
>>>> Yes.  The SMTP server mentioned that it is accepting the message (up to the end-of-data terminator.  Rejecting the message is not an option once the message has been accepted.
>>> Hence the dilemma.  It wasn't an valid RFC5322 message and the issue is exasperated when it was DKIM signed and now recorded as a failure. Never mind the fact QUIT (or a new transaction command) is an SMTP requirement before the transaction is considered complete for delivery.
>> Where do you get that idea?  RFC 2821 doesn't require this.  It only requires that the server not close the connection until it sees a QUIT.  (It even says that clients SHOULD send a QUIT, implying that things should still work if they don't.)

Cheers,
Sabahattin