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

Re: [sieve] Notify (RFC 5435) questions

2009-09-28 13:32:18
On Mon, Sep 28, 2009 at 10:36 AM, Hannah Schroeter 
<hannah(_at_)schlund(_dot_)de> wrote:
Section 3.4. Notify Tag ":importance" says that the :importance tag
specifies a numerical value from one through three as a string. However,
it doesn't specify what happens when a script fails to comply with that,
i.e. the string specifies a different number, or not a number at all

What happens is the same as what happens with any other syntax error:
it causes a compile-time error (or, if variable substitution is used,
a run-time error after the variable substitution).

This doesn't fit with the ductus of other parts of the spec (such as
:from, or the parameter method) where error handling or ignoring things
(e.g. from values that are syntactically correct but not allowed for the
script owner for policy reasons) are clearly specified.

I don't know what "ductus" means, but this isn't a case of policy.
There's no need to say specifically what happens if a script violates
the grammar in this case, because we know what to do when a script
violates the grammar in general.

By the way, the ABNF suggests that the number has to be given literally,
but the specification doesn't spell it out whether that really implies
the :importance parameter has to be a *constant* string in the sense of
the variables extension.

We thought it was clear that these were strings, which could be put in
as variables, but I see how it can be confusing.  The intent is
certainly that variables may be used here.  Perhaps we should enter an
erratum suggesting a comment in the ABNF that makes this clear.

A bit of history:
The parameter was originally called "priority", and had text-string
values.  From the -00 draft version:

    The priority parameter specifies the importance of the notification.
    The priority parameter has the following values: ":high" (very
    important), ":normal", and ":low" (not very important). If no
    priority is given, a default priority of ":normal" SHOULD be
    assumed.

After discussion about similar parameters in other protocols (XMPP and
SIP were mentioned), we decided to change it to "importance" in the
-04 version, but the value had already changed to the number-strings
in the -01 version.  One could search the mailing list archives to
find the discussion and see the reasoning, but searching the mailing
list archives is unnecessarily difficult.

I often wish we would leave some of the historical information in the
documents, so that people who come along later can see how we arrived
where we are, and perhaps understand it better (and so we, ourselves,
can go back and easily look).

To the specific questions:

 1. Is the parameter of :importance a *constant* string (as the ABNF
    suggests) or can it expand variables (as the variables extension
    says all strings do if one uses it unless *explicitly* told to be
    constant)?

The latter.

 2. If the string of the parameter doesn't specify a number at all,
    is that an error or is the parameter silently ignored and the
    default importance ("2") used?

Error, as with any other incorrect parameter that doesn't give other
explicit guidance.

 3. If the string of the parameter *does* specify a number, but one
    out of range, is that an error or is it ignored? In the latter
    case, is the default importance used or is the number clipped
    to the range (from below 1 to 1, from above 3 to 3)?

The same as 2.

 4. Are leading zeroes tolerated as the *text* suggests "a numeric
    value represented as a string" or not, as the ABNF suggests,
    [":importance" <"1" / "2" / "3">]?

We didn't explicitly consider this, but the grammar specifies a
string, and does not allow leading zeroes.  I would anticipate that
implementations might take that as specified.

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

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