Subject: variables and relational interaction

From: Kjetil Torgrim Homme <[email-masked]>
Date: Thu, 05 Aug 2004 16:32:55 +0200

relational defines to new modifiers for all tests, :value and :count.
the variables draft has a new test, "string", but it doesn't mention any
match types explicitly.  the relational RFC defines :value quite
generally, and I don't think the variables draft needs to the say
anything about it.  however, the :count match type has its behaviour
listed for each of the known tests.

        The COUNT match type first determines the number of the
        specified entities in the message and does a relational
        comparison of the number of entities to the values specified in
        the test expression.

        [...] The envelope "from" will be 0 if the MAIL FROM is blank,
        or 1 if MAIL FROM is not blank. [...] In all cases, if more than
        one field name is specified, the counts for all specified fields
        are added together to obtain the number for comparison.

I suggest that the value of :count is 0 if the string is empty (""), and
1 if not.

	if string :count "eq" :comparator "i;ascii-numeric"
           ["foo", "bar", ""] "2" {
		# the test is always true
	}

probably not very useful, but I think it should be added for
completeness.  suggested wording, at the end of the section on the
"string" test:

        The "relational" extensions adds a match type called ":count".
        The count of a single string is 0 if it is the empty string, or
        1 otherwise.  The count of a string list is the sum of the
        counts of the member strings.

-- 
Kjetil T.

---

From: [email-masked]
Date: Thu, 05 Aug 2004 09:05:23 -0700 (PDT)

>         counts of the member strings.

The alternative would be to prohibit :count on string. I have no real
preference either way; as you say it isn't very useful, but it also
isn't hard to implement.

				Ned