[Top] [All Lists]

thoughts about external lists

2008-10-27 18:30:40


Rereading draft-melnikov-sieve-external-lists-01 the main idea that came to my mind is that ":list" adds one more (unnecessary) dimension. In case of "header", "address" and "envelope" test, their last parameter so far is a string-list:

            address [COMPARATOR] [ADDRESS-PART] [MATCH-TYPE]
            <header-list: string-list> <key-list: string-list>

            envelope [COMPARATOR] [ADDRESS-PART] [MATCH-TYPE]
            <envelope-part: string-list> <key-list: string-list>

            header [COMPARATOR] [MATCH-TYPE]
            <header-names: string-list> <key-list: string-list>

With ":list" added the last parameter will be altered from "list of strings" to a "list of list of strings". At the same time mixing "internal" and external lists gets more complicated than necessary. For doing a check "if a mail does not come from my three girlfriends, or my company, then reject it" it would be necessary to write

        if anyof(envelope "from" ["g1", "g2", "g3"],
envelope :lists "from" ["my-department", "our-partners"]) { reject ":P"; }

I think it would be better to allow references to lists in any string-list, which expands the references, so that the string-list can be used normal. What about replacing :list "my-pets" with L{my-pets}, hence the above check would be rewritten as

if envelope "from" ["g1", "g2", "g3", L{my-department}, L{<our-partners}] { reject ":P"; }

In this way only the definition of string-list has to be changed. The test envelope, address and header stay untouched. For "redirect" one has just to write that it accepts now string-list instead of just "string".

        Със здраве,

<Prev in Thread] Current Thread [Next in Thread>