[Top] [All Lists]

Re: extensions and sieve

2003-03-19 17:15:31

Here's a hasty first draft:

Test mimeheader

   Syntax: mimeheader [:param <params:string-list>] [COMPARATOR]
             <header-names: string-list> <key-list: string-list>

   The "mimeheader" test evaluates to true if any of the values of
   the named MIME headers match any of the keys.  The type of match
   is specified by the optional [MATCH-TYPE] argument, which defaults
   to ":is", as specified in section 2.6 of [SIEVE].

Given that I won't be in San Fransisco for tommorow's 11:30am meeting, I
thought I'd throw in my 2p (or should I say 2cents) and say that I like
Jutta's draft.  It solves part of the problem that my cheap and dirty
"x_body" test offers :o)

However I think I preferred my "recursive" extension that I suggested in  Nobody
seemed to respond to that suggestion (perhaps cos you all hated it?).  Mime
structure is pretty recursive after all....

So I'd recon we should have two extensions:

:param - which allows you to split off this stuff
    *(token / <tspecial other than ;>) *(; name=value)

    [We should allow some way of matching only the "token" bit, so if the
header is:
        Content-Type: text/plain;  charset="US-ASCII"
    Then we only match the "text/plain" bit.  Maybe a blank param?  ie
:param "" ?]

:recursive - which operates recursively on main mail headers through to all
body part headers, but could also apply to the exists and size tests too.

Ideally you'd be able to have some kind of "select" test that would select a
body part, then filter on only that content.  Maybe a "with".  So rather
than the "allof" test that looks for a message that matches all criteria,
the "with" would look for a single body part that matches all the criteria.
So you could say:

    if with (header :recursive :param "charset" :is "Content-Type"
                header :recursive :param "" :contains "Content-Type" "text",
                body :contains "sex")

It seems like we really want to get our body and our header tests all
working well together rather than in isolation.  Hope you have a productive
meeting tommorow!



<Prev in Thread] Current Thread [Next in Thread>
  • Re: extensions and sieve, Nigel Swinson <=