Re: Interaction of encoded-character extension with variables extension

Tony Hansen <tony@att.com> Sun, 23 December 2007 15:07 UTC

Return-path: <owner-ietf-mta-filters@mail.imc.org>
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1J6SQ0-0004L0-2p for sieve-archive-Aet6aiqu@lists.ietf.org; Sun, 23 Dec 2007 10:07:08 -0500
Received: from balder-227.proper.com ([192.245.12.227]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1J6SPz-0006Uj-9O for sieve-archive-Aet6aiqu@lists.ietf.org; Sun, 23 Dec 2007 10:07:08 -0500
Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id lBNEnKLK072198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 23 Dec 2007 07:49:20 -0700 (MST) (envelope-from owner-ietf-mta-filters@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id lBNEnKYA072197; Sun, 23 Dec 2007 07:49:20 -0700 (MST) (envelope-from owner-ietf-mta-filters@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-mta-filters@mail.imc.org using -f
Received: from mail121.messagelabs.com (mail121.messagelabs.com [216.82.241.195]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id lBNEnI3X072190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for <ietf-mta-filters@imc.org>; Sun, 23 Dec 2007 07:49:19 -0700 (MST) (envelope-from tony@att.com)
X-VirusChecked: Checked
X-Env-Sender: tony@att.com
X-Msg-Ref: server-6.tower-121.messagelabs.com!1198421356!22472500!1
X-StarScan-Version: 5.5.12.14.2; banners=-,-,-
X-Originating-IP: [144.160.128.149]
Received: (qmail 6724 invoked from network); 23 Dec 2007 14:49:17 -0000
Received: from sbcsmtp9.sbc.com (HELO flph024.enaf.ffdc.sbc.com) (144.160.128.149) by server-6.tower-121.messagelabs.com with AES256-SHA encrypted SMTP; 23 Dec 2007 14:49:17 -0000
Received: from enaf.ffdc.sbc.com (localhost.localdomain [127.0.0.1]) by flph024.enaf.ffdc.sbc.com (8.14.0/8.14.0) with ESMTP id lBNEnGpP014691 for <ietf-mta-filters@imc.org>; Sun, 23 Dec 2007 06:49:16 -0800
Received: from klph001.kcdc.att.com (klph001.kcdc.att.com [135.188.3.11]) by flph024.enaf.ffdc.sbc.com (8.14.0/8.14.0) with ESMTP id lBNEn8lr014666 for <ietf-mta-filters@imc.org>; Sun, 23 Dec 2007 06:49:09 -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 lBNEn8OH021419 for <ietf-mta-filters@imc.org>; Sun, 23 Dec 2007 08:49:08 -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 lBNEn3I3021392 for <ietf-mta-filters@imc.org>; Sun, 23 Dec 2007 08:49:04 -0600
Received: from [135.210.112.90] (unknown[135.210.112.90](misconfigured sender)) by maillennium.att.com (mailgw1) with ESMTP id <20071223144903gw10010gope> (Authid: tony); Sun, 23 Dec 2007 14:49:03 +0000
Message-ID: <476E7530.3050606@att.com>
Date: Sun, 23 Dec 2007 09:48:16 -0500
From: Tony Hansen <tony@att.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: SIEVE <ietf-mta-filters@imc.org>
Subject: Re: Interaction of encoded-character extension with variables extension
References: <476B9BCD.80300@rename-it.nl> <1198243807.7464.168.camel@oslhomkje>
In-Reply-To: <1198243807.7464.168.camel@oslhomkje>
X-Enigmail-Version: 0.95.5
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>
X-Spam-Score: 0.0 (/)
X-Scan-Signature: cd26b070c2577ac175cd3a6d878c6248

It would have to be brought out of auth48, but a change to add text
could still be done before it is published without losing the
already-assigned RFC number. It would just not come out of the queue at
the same time as the others (5228 through 5235). Given that RFC-to-be
3889 is still in the RFC editor queue, this is not that unusual a thing.

Is it worth it? This seems like a case that *would* be better done now
rather than in an errata.

If we were to do this, the RFC editor would have to be told quickly so
that they don't go ahead and publish it. Cyrus? Alexey?

Whether is is done now or as an errata, a suggested change is to do this
in section 3.1:

diff rfc5229.txt rfc5229-with-change.txt
*** 143,145 ****
! 3.1.  Quoting
--- 143,145 ----
! 3.1.  Quoting and Encoded Characters

*** 146,148 ****
     The semantics of quoting using backslash are not changed: backslash
!    quoting is resolved before doing variable substitution.
--- 146,150 ----
     The semantics of quoting using backslash are not changed: backslash
!    quoting is resolved before doing variable substitution.  Similarly,
!    encoded character processing is performed before doing variable
!    substitution.

*** 154,155 ****
--- 156,158 ----
                                 expansion of variable foo.
+       "${hex: 24 7B}foo}" => "${foo}" => the expansion of variable foo.

	Tony Hansen
	tony@att.com

Kjetil Torgrim Homme wrote:
> On Fri, 2007-12-21 at 11:56 +0100, Stephan Bosch wrote:
>> I am building a Sieve implementation and, while reading the new 3028bis 
>> specification, I noticed the new encoded-character extension. Its 
>> substitution syntax is somewhat similar to what the variables extension 
>> defined ( i.e. ${....} ). I am currently working with 
>> draft-ietf-sieve-3028bis-13 and draft-ietf-sieve-variables-08. Now I am 
>> wondering how these extensions are supposed to work if both are active. 
>> Niether specification mentions this possibility (variables-08 seems to 
>> be pretty old already though).
> 
> you're right, this is my mistake, I forgot to add text to variables.
> 
>> One could define encoded-character substituion to be performed before 
>> any variables substitution, making the variables substitution act upon 
>> the result of the encoded character substitution.
> 
> this was the WG consensus when it was discussed in November 2006.  see
> the thread "Invalid syntax to cause runtime error in encoded-character"
> 
>> Although this is (to my opinion) intuitively the most logical 
>> implementation, I can imagine other options in which encoded character 
>> and variables substituion is performed in parallel, making use of the 
>> fact that both extensions use the same delimiters for marking a 
>> substitution. This could make things more efficient, as only one pass is 
>> needed to identify substitutions in the string. This makes the above 
>> situation result in just "${foobar}" without further substitution.
> 
> if you are worried about performance, you byte-compile the script during
> upload, and remove the encoded-characters then.
> 
>> Note that I am not trying to revive any old discussion on this topic. I 
>> would just like to know what your opion is on this issue and I am hoping 
>> that you could make this more explicit in the specification.
> 
> unfortunately, the variables draft is due to be published.  I guess
> we'll have to leave it for the next version when/if it is progressed to
> Draft Standard.
>