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

Is envelope missing :comparator arguement?

1999-02-22 12:25:40
Filter list memebers,

I was reviewing the "address" and "envelope" tests in the latest sieve
draft, I found that "envelope" seems to be missing a comparator argument.
Both "address" and "envelope" tests deal with internet e-mail addresses.
The "address" test spec points out...

   Internet email-addresses have the somewhat awkward characteristic
   that the mailbox-part [IMAIL] to the left of the at-sign is
   considered case sensitive, and the domain-part to the right of the
   at-sign is case insensitive.  The "address" command does not deal
   with this itself, but provides the ADDRESS-PART argument for allowing
   users to deal with it.

It appears to me that the ADDRESS-PART arugment, in conjunction with
the COMPARATOR argument, allows a script to do the "right thing".
If so, the "envelope" should include the COMPARATOR arugment.

As an aside, a sieve that wants to do the "right thing" when checking
for an e-mail address would look like the following....

 # localpart of address is case-sensitive, domain is not.
 if allof ( address :is :localpart :comparator "i;octet" "from" "tim",
    address :is :domain "from" "example.com" ) {
    discard;
 }

Hmm, looks like ADDRESS-PART and COMPARATOR can't really do what is
intended.  Maybe its OK for a single "From" line, but checking the
address in the multiple "To" lines is broken.  The following message
header will give a false positive:

        To: TIM(_at_)example(_dot_)com
        To: tim(_at_)cia(_dot_)gov

Neither one of these user's address match "tim(_at_)example(_dot_)com", but the
script thinks so.  The problem is the that the ADDRESS-PART cannot be
related to another "address" test so both the :localpart and :domain
parts are operating on the same address.

It seems to me that this can be fixed by having the "envelope" and
"address" tests deal (correctly) with the case of the localpart and
domain part.  The COMPARATOR argument could be dropped from both of
these commands.

Greg Sereda