ietf-mta-filters
[Top] [All Lists]

Re: Interaction of encoded-character extension with variables extension

2007-12-21 06:40:31

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.

-- 
best wishes,
Kjetil T.

<Prev in Thread] Current Thread [Next in Thread>