Re: STARTTLS & EHLO

Tony Hansen <tony@att.com> Thu, 29 January 2009 16:46 UTC

Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.14.2/8.14.2) with ESMTP id n0TGkFxS027698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jan 2009 09:46:15 -0700 (MST) (envelope-from owner-ietf-smtp@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.14.2/8.13.5/Submit) id n0TGkFhU027697; Thu, 29 Jan 2009 09:46:15 -0700 (MST) (envelope-from owner-ietf-smtp@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-smtp@mail.imc.org using -f
Received: from mail129.messagelabs.com (mail129.messagelabs.com [216.82.250.147]) by balder-227.proper.com (8.14.2/8.14.2) with ESMTP id n0TGk4G9027676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for <ietf-smtp@imc.org>; Thu, 29 Jan 2009 09:46:14 -0700 (MST) (envelope-from tony@att.com)
X-VirusChecked: Checked
X-Env-Sender: tony@att.com
X-Msg-Ref: server-4.tower-129.messagelabs.com!1233247563!27563708!1
X-StarScan-Version: 6.0.0; banners=-,-,-
X-Originating-IP: [144.160.128.141]
Received: (qmail 9275 invoked from network); 29 Jan 2009 16:46:03 -0000
Received: from sbcsmtp9.sbc.com (HELO flph161.enaf.ffdc.sbc.com) (144.160.128.141) by server-4.tower-129.messagelabs.com with AES256-SHA encrypted SMTP; 29 Jan 2009 16:46:03 -0000
Received: from enaf.ffdc.sbc.com (localhost.localdomain [127.0.0.1]) by flph161.enaf.ffdc.sbc.com (8.14.3/8.14.3) with ESMTP id n0TGk2NR017921 for <ietf-smtp@imc.org>; Thu, 29 Jan 2009 08:46:03 -0800
Received: from klph001.kcdc.att.com (klph001.kcdc.att.com [135.188.3.11]) by flph161.enaf.ffdc.sbc.com (8.14.3/8.14.3) with ESMTP id n0TGjwtg017835 for <ietf-smtp@imc.org>; Thu, 29 Jan 2009 08:45:58 -0800
Received: from kcdc.att.com (localhost.localdomain [127.0.0.1]) by klph001.kcdc.att.com (8.14.0/8.14.0) with ESMTP id n0TGjwPg000757 for <ietf-smtp@imc.org>; Thu, 29 Jan 2009 10:45:58 -0600
Received: from maillennium.att.com (dns.maillennium.att.com [135.25.114.99]) by klph001.kcdc.att.com (8.14.0/8.14.0) with ESMTP id n0TGjtJB000697 for <ietf-smtp@imc.org>; Thu, 29 Jan 2009 10:45:55 -0600
Received: from [135.91.110.250] (ds135-91-110-250.dhcps.ugn.att.com[135.91.110.250](untrusted sender)) by maillennium.att.com (mailgw1) with ESMTP id <20090129164554gw1000u61ne> (Authid: tony); Thu, 29 Jan 2009 16:45:55 +0000
Message-ID: <4981DD42.7090901@att.com>
Date: Thu, 29 Jan 2009 11:45:54 -0500
From: Tony Hansen <tony@att.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: John C Klensin <john+smtp@jck.com>
CC: ietf-smtp@imc.org
Subject: Re: STARTTLS & EHLO
References: <497DE492.4080506@pscs.co.uk> <497DED29.70402@att.com> <497ED420.30708@pscs.co.uk> <alpine.LSU.2.00.0901271403220.4546@hermes-2.csi.cam.ac.uk> <497F86CB.60904@att.com> <alpine.LSU.2.00.0901281434440.4546@hermes-2.csi.cam.ac.uk> <498088B8.9040404@pscs.co.uk> <alpine.LSU.2.00.0901291310080.4546@hermes-2.csi.cam.ac.uk> <4981C0D5.1010401@pscs.co.uk> <4981C6BD.2040900@att.com> <37F39FF37390694B69567838@PST.JCK.COM>
In-Reply-To: <37F39FF37390694B69567838@PST.JCK.COM>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Sender: owner-ietf-smtp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-smtp/mail-archive/>
List-ID: <ietf-smtp.imc.org>
List-Unsubscribe: <mailto:ietf-smtp-request@imc.org?body=unsubscribe>

I was taking Tony Finch's comments

	But there's plenty of other information that the server has to
	discard - for example any AUTH results, any partial MAIL
	transactions - which isn't explicitly listed in RFC 3207.

to its next step. He was saying that

	S: <start>
	C: 220
	S: MAIL FROM:<...>
	C: 250 OK
	S: RCPT TO:<...>
	C: 250 OK
	S: STARTTLS

that the MAIL_FROM and RCPT_TO information is also discarded. So my
observation was that

	STARTTLS SHOULD only be executed immediately after the initial
	EHLO.

Doing otherwise may cause the server to do extra processing that will
all just get thrown away.

The verbs that I gave examples of were ones that don't affect the state
machine in any way, so would be reasonable to send between <start> and
STARTTLS. That's why I said "SHOULD" instead of "MUST".

I'm going to suggest an Errata in a separate email message.

	Tony

John C Klensin wrote:
> 
> 
> --On Thursday, January 29, 2009 10:09 -0500 Tony Hansen
> <tony@att.com> wrote:
> 
>> If this is the interpretation that we gain consensus on, that
>> it means "start over from scratch", it might as well also say
>> that it
>>
>> 	SHOULD only be executed immediately after the initial EHLO.
>>
>> The only possible exceptions to this rule would be for verbs
>> that don't affect the state machine, such as VRFY, EXPN, HELP,
>> NOOP.
> 
> RSET is also harmless immediately after EHLO.  Changing the
> state from "session open (EHLO issued), no mail transaction
> state" to "session open (EHLO issued), no mail transaction
> state" is a no-op.  And the first paragraph of 4.1.1.5 of 5321
> says that.
> 
> Out of context, I'm not sure exactly what you are suggesting
> above, but I believe that it would mean:
> 
>     S: 220 ...
>     C: EHLO ...
>     S: 250-...
>     S: 250-STARTTLS
>     S: 250-...
>     S: 250 OK
>     C: STARTTLS  ...
>     (TLS session starts)
>     and the next command must be either EHLO
>     or as many instances of any of VRFY, 
>       EXPN, HELP, NOOP, RSET as desired, followed by EHLO
> 
> Also, the "what the server MUST (or SHOULD) discard and the
> client MUST (or SHOULD) not depend on" sentences and example
> might reasonably be modified to explicitly include any
> information gained from VRFY or EXPN issued between the 220
> greeting and the initial EHLO.  While one might not trust VRFY
> or EXPN queries or results issued under TLS either, it would be
> pointless and silly to send them before the initial EHLO if one
> knew that one was going to issue STARTTLS if the server
> permitted it.   Indeed the only reason for doing so would be if
> one intended to make a decision about whether to continue with a
> mail transaction at all based on the results of VRFY or EXPN...
> and that would be very rare today except in special
> circumstances.
> 
>       john
>