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

Re: [sieve] Issues with RFC 5260 - Date/Index (was: Issues with specifications)

2009-09-15 11:36:40
Hi!

On Thu, Sep 10, 2009 at 08:54:36AM -0700, Ned Freed wrote:
[...]

- Date extension:
  * Section 4.2 enumerates the possible values for the date-part argument.
    However, it does not specify any error handling for the case if the
    script uses an invalid value there; especially if that value is
    generated by use of the variables extension, thus possibly making
    static checking impossible.

      Should invalid date-part arguments be an error (static, if possible,
    run-time else)?

Yes, I think so. Our implementation certainly does.

Ok, I'll implement it that way, though I'd be happier if it were
explicitly specified that way. One could as easily make a case for
making the test just return false.

It's not completely clear. There's precedent for tolerant behaviour, e.g.
allowing syntactically invalid header names in tests (2.4.2.2. in the
basic Sieve spec, RFC 5228), making the tests fail (return false), but
not an error, which is opposite to the precedent for strict behaviour
in other places I already cited.

As the precedent is mixed, the conclusion is less clear than in the
above question, so this should in my eyes really be clarified in a
further revision of the RFC.

Does your implementation also flag an error if it can be detected only
during run-time? (Causing an implicit keep and some kind of notification
to the script owner about the error, as 5228 says...)

Our implementation only flags the error at runtime. In general this is
the only time it can be done.

That's right *in general* - same as for comparators.

However, it's easy to know when a string is *constant*. It always is
when the script doesn't use the variables extension. Otherwise it is
when the string doesn't expand variables. The Sieve engine needs to know
that property of strings elsewhere (e.g. for checking whether the
variable name in the "set" command is constant).

So my Sieve engine checks comparator names statically if they're
constant and defers checking to runtime when they're not (in fact it's
not very well-optimized as the preference is clean, easy code over
speed, so it checks always at runtime, but additionally statically if
easily possible; no constant folding or other fancy tricks).

Doing the checks *only* at runtime is probably also correct.

                              Ned

Kind regards,

Hannah.
_______________________________________________
sieve mailing list
sieve(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/sieve