[Top] [All Lists]

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

2007-09-25 05:08:57

Arnt Gulbrandsen wrote:


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
   "ken+sieve(_at_)example(_dot_)org").  If no separator character exists, the 
   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: someone(_at_)example(_dot_)org
    To: arnt+sieve(_at_)example(_dot_)org
    Cc: someone(_at_)example(_dot_)org

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.

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