Hi,
When reviewing the ihave document I stumbled on what I believe to be a
bug in RFC 5228 regarding string list:
2.4.2.1. String Lists
When matching patterns, it is frequently convenient to match against
groups of strings instead of single strings. For this reason, a list
of strings is allowed in many tests, implying that if the test is
true using any one of the strings, then the test is true.
For instance, the test 'header :contains ["To", "Cc"]
["me(_at_)example(_dot_)com", "me00(_at_)landru(_dot_)example(_dot_)com"]'
is true if either a To
header or Cc header of the input message contains either of the email
addresses "me(_at_)example(_dot_)com" or
"me00(_at_)landru(_dot_)example(_dot_)com".
Conversely, in any case where a list of strings is appropriate, a
single string is allowed without being a member of a list: it is
equivalent to a list with a single member. This means that the test
'exists "To"' is equivalent to the test 'exists ["To"]'.
Section 3.2 for example contains the following example:
Example: require ["fileinto", "reject"];
However if one looks at the ABNF for string-list it says:
string-list = "[" string *("," string) "]" / string
; if there is only a single string, the brackets
; are optional
string = quoted-string / multi-line
quoted-string = DQUOTE quoted-text DQUOTE
multi-line = "text:" *(SP / HTAB) (hash-comment / CRLF)
*(multiline-literal / multiline-dotstart)
"." CRLF
So it seems that the description, the examples of string lists doesn't
match the ABNF syntax for string lists. If I am correct, I think the WG
needs to address this somehow.
Cheers
Magnus Westerlund
IETF Transport Area Director & TSVWG Chair
----------------------------------------------------------------------
Multimedia Technologies, Ericsson Research EAB/TVM
----------------------------------------------------------------------
Ericsson AB | Phone +46 10 7148287
Färögatan 6 | Mobile +46 73 0949079
SE-164 80 Stockholm, Sweden| mailto:
magnus(_dot_)westerlund(_at_)ericsson(_dot_)com
----------------------------------------------------------------------