[Top] [All Lists]

Re: Comments on draft-daboo-sieve-mime-00.txt

2004-03-16 20:25:47

Hi Ned,
Thanks for your comments:

--On Monday, March 8, 2004 9:22 AM -0800 ned(_dot_)freed(_at_)mrochek(_dot_)com 

| Having said that, I think the specifics of how this was done aren't
| right. First, as presently written this specification only extends the
| header test, and it does so by creating an entirely new test. But there
| are two other tests that are equally applicable to inner headers: exists
| and address. Either similar "mimeexists" and "mimeaddress" tests need to
| be added (and perhaps "mime" changed to "mimeheader"), or this needs to
| be done within the existing tests by adding a :mime parameter. I'm
| indifferent as to which one of these approaches is chosen, but we do need
| one of them.
| Second, I really don't like the use of an optional middle parameter to
| specify that the test is to be performed on a parameter value. This sort
| of thing is why we have labelled parameters: It should be done as
| :parameter or something similar. As for the use of a null parameter-names
| value to indicate a test of non-paramer material, this can done with
| :parameter as well, but I do worry that this is a bit tricky. OTOH, I
| haven't been able to come up with a differenent way to do it that I like
| better.

OK - here is another solution to the syntax. What I'm proposing is a
mimeheader test that takes the following parameters:

:name - the name of a specific MIME header to test (can be a list of names)
:parameter-name - the name of a specific parameter name to test (can be a

:exists - test the existence of the specified items

:text - do comparisons against the content of the entire MIME header
:value - do comparisons against the value of the MIME header, excluding
:parameter-value - do comparisons on parameter values only

I really don't care for this at all. Like it or not, sieve opted to define
three tests that act on headers: header/exists/address. Unless there is a very
compelling reason to alter this model - and I've seen no evidence that there is
such a reason - I think we should stick with it. And this argues for either of
the proposals I made previously: mimeheader/mimeexists/mimeaddress or an
additional parameter on the existing tests. NIgel has expressed a preference
for the latter, but I'm happy with either.

Think of it this way: Changing an existing script that employs tests on
the outer header to one that tests all headers in the MIME structure
shouldn't require switching to a completely different sort of test.
A simple addition should be sufficient, and whether that addition is
a test name prefix or a new parameter makes no difference to me.