[Top] [All Lists]

Re: I-D ACTION:draft-degener-sieve-body-00.txt

2002-07-29 07:46:21

I like this version much better,

Me too :o)

but still some small

Here's a very small nit:

Syntax in 4.0 reads:
                / ":content" <content-types: string-list>
                / ":text"

But section header 4.2 reads:
    4.2 Body Transform ":content_type"

I presume that it's meant to be "content_type" in both places...

Default transformation should be ":text".  If in our implementation we don't
see the :raw argument, then it will be a compile time error.  When we create
the script element we'd create with the :raw tag argument.

0) No way to split based on MIME structure or MIME headers.  Compare
   the complex MIME-parsing features of the IMAP FETCH BODY[] command.
   It may take the sieve body extension too far to dvelve into a
   full-blown MIME parser, but it might be useful some day.  E.g.,
   split all OpenPGP multipart/encrypted mail into one folder, all
   S/MIME multipart/encrypted mail into another folder.

Yeah it seems the way we have it now it's great for looking for stuff inside
the text of body parts, but we're missing a way to test against the mime
headers of body parts, and the existance of body parts (although we could
just about do it by doing a :raw search).  Should we try to do this in the
same test, or should we have a separate test for these kind of searches?

In some ways we want to have recursive tests, like size, header and exists
that would operate on all body parts rather than just the main message.
Perhaps a test like this

    if header :recursive :contains "Content-Type" "text" {}

To look for messages that contain at least one text body part.

    if allof (header :recursive :contains "Content-Type" "text", size :over
"2K") {}

All messages that contain a text body part and the complete message is over

    if allof (header :recursive :contains "Content-Type" "text", size
:recursive :over "2K") {}

All messages that contain a text body part that is bigger than 2K

    if header :recursive :contains "Content-Type" "text" {
        if size :recursive :over "2K" {}

All messages that contain a text body part, and a body part that is bigger
than 2K.

Perhaps a count test that would count the number of body parts of a
particular type would be useful too?

    if count :contains "Content-Type" "text" :over 2 {}

Perhaps something along these lines would complement the proposed body test
and together they would give us most (all?) the matching we'd need?


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