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

Re: WGLC on draft-freed-sieve-ihave-02.txt

2008-09-15 20:40:26

Ned Freed writes, answering Stephan Bosch:
>> From what I understand from your explanation, the obvious typo
>> 'filinto' will not be noticed during compile (because it may be part
>> of the obscure "frop" extension that could be enabled by ihave
>> throughout the rest of the script) and the ManageSieve upload will
>> succeed.
>
> Yes, that's indeed the case.

Not quite, unless the variables exension is also used. Here's the
example again, a little uglified:

require "ihave";
require "fileinto";

if ihave "frop" {
     friep "This is a nifty feature.";
     # point A
}

# point B

if header "X-Important" "yes" {
     filinto "Important";
     # point C
}

At point A, the script author/generator knows that frop is available,
and can use friep. At point B, the script author doesn't know that any
more: At point B, use of frop might cause a runtime error.

At point C, the author/generator still doesn't know that frop is
available. If the managesieve server assumes that the script is not
meant to cause a runtime error, the managesieve server can give an
error for filinto at point C.

Use of variables changes that. It would be possible to set a variable at
point A and test that variable just before point C, so if variables is
used, then filinto can't be flagged at managesieve put time.

My conclusion is that frop isn't really available except at A. The rule
as it stands is sufficient to hamper error detection, but it only
allows using friep/frop in rather odd cases, and trying to get it right
causes too much wear and tear on programmer brains.

I appreciate why the rule is there, though...

Agreed on all points.

                                Ned

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