Subject: a conflict between 3598(bis) and the base specification

From: Arnt Gulbrandsen <[email-masked]>
Date: Tue, 25 Sep 2007 11:50:51 +0200

Hi,

3598 and 3598bis contain this (which I apologise for not spotting while 
reviewing 3598bis):

    The ":detail" argument specifies that sub-part of the local-part
    which lies to the right of the separator character (e.g., "sieve" in
    "[email-masked]").  If no separator character exists, the test
    evaluates to false.  If nothing lies to the right of the separator
    character, then ":detail" ":is" the null key ("").  Otherwise, the
    ":detail" sub-part contains the null key.

Why is the second sentence there? It seems to add a new value or throw 
an exception which aborts the surrounding test and attempts to override 
its result.

Consider this test and header fragment:

     if address :detail ["to", "cc"] "sieve" {
         fileinto "sieve";
     }

     From: [email-masked]
     To: [email-masked]
     Cc: [email-masked]

The specification for the "address" test lead me to think that since I'm 
addressed as arnt+sieve, the test should hit. But no separator 
character exists on the Cc field, so the second sentence quoted above 
says the address test fails.

I don't like the way the address and :detail specifications conflict in 
this case.

Arnt

---

From: Ken Murchison <[email-masked]>
Date: Tue, 25 Sep 2007 07:56:45 -0400

Arnt Gulbrandsen wrote:
> addressed as arnt+sieve, the test should hit. But no separator character 
> exists on the Cc field, so the second sentence quoted above says the 
> address test fails.

True, the test against the Cc field fails, but when given a list of 
headers/strings, a logical OR is applied, so matching against To is 
sufficient for the test to succeed.  In fact, the implementation SHOULD 
short-circuit the test after the To, and never test against Cc.

-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Tue, 25 Sep 2007 14:31:12 +0200

Ken Murchison writes:
> sufficient for the test to succeed.

Ah, now I see what you're saying. But 3028 consistently talks about 
"address" as a single test with multiple arguments, not as a collection 
of single-argument tests, so "the test evaluates to false" is less than 
ideal phrasing.

3598bis is in the RFC-Editor's queue, isn't it? Too late to change 
anything substantive. I suppose a minor rephrasing could be done during 
auth48. Perhaps ", then the :detail doesn't match anything" or 
something like that. Not terribly important. Change it if you think 
that's both appropriate and permissible.

> In fact, the implementation SHOULD short-circuit the test after the 
> To, and never test against Cc.

That's irrelevant. If the example test were address :detail ["cc", "to"] 
or the example header's Cc field were before its To field, this 
argument would not apply. Much too fragile to matter.

Arnt
(noncompliant implementer)

---

From: Ken Murchison <[email-masked]>
Date: Tue, 25 Sep 2007 10:36:49 -0400

Arnt Gulbrandsen wrote:
> auth48. Perhaps ", then the :detail doesn't match anything" or something 
> like that. Not terribly important. Change it if you think that's both 
> appropriate and permissible.

Anyone want to second this suggestion?

---

From: Ned Freed <[email-masked]>
Date: Tue, 25 Sep 2007 09:16:24 -0700 (PDT)

> Anyone want to second this suggestion?

Changing it to say "fails to match" or something similar seems fine to me.

				Ned

---

From: Ken Murchison <[email-masked]>
Date: Tue, 25 Sep 2007 17:08:55 -0400

Ned Freed wrote:
>> something

How about this?

Original text:

If the address is not encoded to contain a detail sub-part, then the 
test evaluates to false.

Proposed text 1:

If the address is not encoded to contain a detail sub-part, then the 
address fails to match any of the key-list arguments.

Proposed text 2:

If the address is not encoded to contain a detail sub-part, then the 
address fails to match any of the specified keys.

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 26 Sep 2007 10:16:30 +0100

> Changing it to say "fails to match" or something similar seems fine to 

+1.

I don't think this change is very controversial, so it can be done in 
AUTH48.

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 26 Sep 2007 11:47:10 +0100

> address fails to match any of the specified keys.

Either one is fine, I slightly prefer choice 1 (on the other hand 2 is 
more readable. So I guess I can't really decide in this case :-)).

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Wed, 26 Sep 2007 12:58:45 +0200

> more readable. So I guess I can't really decide in this case :-)).

Either is fine with me as well. 2 slightly better.

Arnt