Subject: I-D ACTION:draft-ietf-sieve-3431bis-02.txt

From: [email-masked]
Date: Mon, 21 Nov 2005 18:50:01 -0500

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the Sieve Mail Filtering Language Working Group of the IETF.

	Title		: Sieve Extension: Relational Tests
	Author(s)	: W. Segmuller, B. Leiba
	Filename	: draft-ietf-sieve-3431bis-02.txt
	Pages		: 14
	Date		: 2005-11-21
	
This document describes the RELATIONAL extension to the Sieve mail
   filtering language defined in RFC 3028.  This extension extends
   existing conditional tests in Sieve to allow relational operators.
   In addition to testing their content, it also allows for testing of
   the number of entities in header and envelope fields.

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-sieve-3431bis-02.txt

To remove yourself from the I-D Announcement list, send a message to 
[email-masked] with the word unsubscribe in the body of the message.  
You can also visit https://www1.ietf.org/mailman/listinfo/I-D-announce 
to change your subscription settings.

Internet-Drafts are also available by anonymous FTP. Login with the username
"anonymous" and a password of your e-mail address. After logging in,
type "cd internet-drafts" and then
	"get draft-ietf-sieve-3431bis-02.txt".

A list of Internet-Drafts directories can be found in
http://www.ietf.org/shadow.html 
or ftp://ftp.ietf.org/ietf/1shadow-sites.txt

Internet-Drafts can also be obtained by e-mail.

Send a message to:
	[email-masked].
In the body type:
	"FILE /internet-drafts/draft-ietf-sieve-3431bis-02.txt".
	
NOTE:	The mail server at ietf.org can return the document in
	MIME-encoded form by using the "mpack" utility.  To use this
	feature, insert the command "ENCODING mime" before the "FILE"
	command.  To decode the response(s), you will need "munpack" or
	a MIME-compliant mail reader.  Different MIME-compliant mail readers
	exhibit different behavior, especially when dealing with
	"multipart" MIME messages (i.e. documents which have been split
	up into multiple messages), so check your local documentation on
	how to manipulate these messages.

Below is the data which will enable a MIME compliant mail reader
implementation to automatically retrieve the ASCII version of the
Internet-Draft.

---

From: Barry Leiba <[email-masked]>
Date: Tue, 22 Nov 2005 12:15:54 -0500

> 	Filename	: draft-ietf-sieve-3431bis-02.txt

Alexey, this is ready for IETF last call now.

Barry

--
Barry Leiba, Pervasive Computing Technology  ([email-masked])
http://www.research.ibm.com/people/l/leiba
http://www.research.ibm.com/spam

---

From: Alexey Melnikov <[email-masked]>
Date: Tue, 22 Nov 2005 17:43:44 +0000

> Alexey, this is ready for IETF last call now.

My recollection is that you've addressed both editorial and 
non-editorial issues raised during WGLC. I don't think another WGLC is 
needed.
Any other opinions?

---

From: "Mark E. Mallett" <[email-masked]>
Date: Mon, 28 Nov 2005 17:20:09 -0500

> non-editorial issues raised during WGLC. I don't think another WGLC is 

There is still this, which I either commented on at one point or meant
to: that the introduction states a few things that Sieve is not.  While
it might be fine to recap some of the attributes of Sieve in an
introduction, listing some of the things that are not present in Sieve
potentially sets the document up to contradict other Sieve documents
should those things eventually appear.  E.g., the phrase "it has no
variables" will (hopefully) be false at some point, and there has been
talk of loops as well.  I still think it's best to leave those sorts of
things unsaid here.

Yours,
-mm-

---

From: Barry Leiba <[email-masked]>
Date: Mon, 28 Nov 2005 19:25:13 -0500

> While it might be fine to recap some of the attributes of Sieve in an
> talk of loops as well.  I still think it's best to leave those sorts
> of things unsaid here.

I thought about that, actually, when I was editing it, and decided to
leave this in.  But if others agree, I'm happy to take it out.  It's
certainly true of the base Sieve, so I'm not worried about inaccuracy.
But it's true that there's not really a need to have a description of
what Sieve is here.

Barry

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 30 Nov 2005 16:12:14 +0000

>But it's true that there's not really a need to have a description of
Speaking as a WG member, I would prefer if you delete everything after 
"Internet Messages Access Protocol (IMAP) servers" (section 2,  
paragraph 1, the last sentence):

   It is suitable for running on a mail server where users may
   not be allowed to execute arbitrary programs, such as on black box
   Internet Messages Access Protocol (IMAP) servers, as it has no
   variables, loops, nor the ability to shell out to external programs.

---

From: Barry Leiba <[email-masked]>
Date: Wed, 30 Nov 2005 11:34:11 -0500

> Speaking as a WG member, I would prefer if you delete everything
> after "Internet Messages Access Protocol (IMAP) servers"

Sure, I can do that -- but why not remove the whole paragraph?  There's
nothing in that paragraph that needs to be there, since the Sieve base
spec tells us what Sieve is, and this whole document is dependent on
that one.

Barry

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 30 Nov 2005 16:52:01 +0000

>spec tells us what Sieve is, and this whole document is dependent on
That is fine as well.

Date: Wed, 30 Nov 2005 16:52:01 +0000
From: Alexey Melnikov <[email-masked]>
To: Barry Leiba <[email-masked]>
CC: [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

>spec tells us what Sieve is, and this whole document is dependent on
That is fine as well.

Date: Wed, 30 Nov 2005 11:34:11 -0500
From: Barry Leiba <[email-masked]>
To: [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

Barry

Date: Wed, 30 Nov 2005 16:12:14 +0000
From: Alexey Melnikov <[email-masked]>
To: Barry Leiba <[email-masked]>
CC: [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

Subject: Re: 'header' test and whitespace
From: Kjetil Torgrim Homme <[email-masked]>
To: Philip Guenther <[email-masked]>
Cc: [email-masked]
Date: Wed, 30 Nov 2005 17:01:04 +0100
Sender: [email-masked]

On Tue, 2005-11-29 at 15:15 -0800, Philip Guenther wrote:
> Kjetil Torgrim Homme <[email-masked]> writes:
> >I'm repeating it once more so Philip may take note of it :-).
> 
> Okay, okay, it's in now.

thanks!  (sorry, didn't mean to imply you weren't paying diligent
attention.)

> >also in the latest draft is this:
> >
> >   The preferred way to test whether a given header is either empty or
> >   absent is to combine an "exists" test and a "header" test:
> >
> >           anyof (header :is "Cc" "", not exists "Cc")
>
> Ick.  I agree that your version matches the "plain meaning" of the
> description better than the one currently in the doc, but it is an
> imprecise description.  Hmm.  How about:
> 
>     Testing whether a given header is either absent or doesn't contain
>     any non-whitespace characters can be done using a negated "header"
>     test:
> 	not header :matches "Cc" "?*"

this seems spurious in the spec text, IMHO, since there is no rationale
for why the text was added.  how about:

        The following test will return false when the header is absent:

        header :is "Cc" ""

        Testing whether a given header is either absent or contains
        nothing but whitespace can be done using a negated "header"
        test:
        
                not header :matches "Cc" "?*"
-- 
Kjetil T.

From: "Mark E. Mallett" <[email-masked]>
Date: Tue, 29 Nov 2005 20:46:25 -0500
To: Philip Guenther <[email-masked]>
Cc: "Mark E. Mallett" <[email-masked]>, [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

On Tue, Nov 29, 2005 at 03:25:43PM -0800, Philip Guenther wrote:
> "Mark E. Mallett" <[email-masked]> writes:
> >On Tue, Nov 29, 2005 at 12:28:57PM +0100, Kjetil Torgrim Homme wrote:
> >> also in the latest draft is this:
> >> 
> >>    The preferred way to test whether a given header is either empty or
> >>    absent is to combine an "exists" test and a "header" test:
> >> 
> >>            anyof (header :is "Cc" "", not exists "Cc")
> >> 
> >> this will evaluate to true for:
> >> 
> >>   Cc: [email-masked]
> >>   Cc:
> >> 
> >> it may not be worth considering this rather degenerate case.  it seems
> >> to me Bcc is a more likely candidate for the stated test.  however, one
> >> way of stating the test correctly is:
> >> 
> >>   not (header :matches "Cc" "?*")
> >> 
> >> it's not much more convoluted, so I think it is worthwhile to change the
> >> "preferred way".
> >
> >Parentheses aside... in my implementation at least, the "header" test
> >would return true (because of the non-empty 'cc'), and be notted to
> >return false.  So this wouldn't work.
> 
> His point is that _is_ the desired behavior.  Given the two line message
> header above, you would say that the Cc: header is either missing or
> empty?  It certainly isn't missing and while one occurrence is empty, I
> would not call "the Cc: header" empty, so returning 'false' is the Right
> Thing.

Oh.. I misunderstood the remarks then (and then assUmeD too much about
the code snippet not working).  I nearly added some words about how I
wasn't absolutely sure from the textual description what the test was
looking for (in the presence of of the "degenerate" example), but I
didn't since it seemed clear enough to me -- but in the opposite of the
intended meaning, apparently.  In my sight, yes, there is a given header
field there that is empty, and thus the test should return true (to
match the narrative).  I don't really see "the Cc: header" -- I see two
"Cc: header fields" and I would indeed view one of their bodies as
empty.  It's hard to account for the way different people look at
things, especially when English is involved.

> Anyway, I've replaced the text in the I-D with this:
>     Testing whether a given header is either absent or doesn't contain
>     any non-whitespace characters can be done using a negated "header"
>     test:
>         not header :matches "Cc" "?*"

I would still come up with the same (opposite of what was intended)
interpretation of the new phrasing, although I'd probably be less sure
of it :).  There's still the ambiguity between "all" and "any" (or
"some" and "none", etc) that can lead to different interpretations.  And
I think replacing "empty" with a more complex phrase obscures the
meaning-- "empty" or "blank" should be pretty clear in the narrative.  I
would find this a little clearer:

    Testing whether there is no appearance of a non-empty field body for
    a given header name can be done using a negated header test:

although still clunky.

> ...
> >But I think you could say
> >
> >   not allof (exists "cc", header :matches "cc" "?*")
> 
> That's equivalent to what's in the -05 I-D.

Hah.  Yes, indeed.

mm

To: "Mark E. Mallett" <[email-masked]>
Cc: [email-masked]
From: Philip Guenther <[email-masked]>
Subject: Re: 'header' test and whitespace 
Date: Tue, 29 Nov 2005 15:25:43 -0800
X-ok-sendmail.com: Yes
Sender: [email-masked]
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:[email-masked]?body=unsubscribe>

"Mark E. Mallett" <[email-masked]> writes:
>On Tue, Nov 29, 2005 at 12:28:57PM +0100, Kjetil Torgrim Homme wrote:
>> also in the latest draft is this:
>> 
>>    The preferred way to test whether a given header is either empty or
>>    absent is to combine an "exists" test and a "header" test:
>> 
>>            anyof (header :is "Cc" "", not exists "Cc")
>> 
>> this will evaluate to true for:
>> 
>>   Cc: [email-masked]
>>   Cc:
>> 
>> it may not be worth considering this rather degenerate case.  it seems
>> to me Bcc is a more likely candidate for the stated test.  however, one
>> way of stating the test correctly is:
>> 
>>   not (header :matches "Cc" "?*")
>> 
>> it's not much more convoluted, so I think it is worthwhile to change the
>> "preferred way".
>
>Parentheses aside... in my implementation at least, the "header" test
>would return true (because of the non-empty 'cc'), and be notted to
>return false.  So this wouldn't work.

His point is that _is_ the desired behavior.  Given the two line message
header above, you would say that the Cc: header is either missing or
empty?  It certainly isn't missing and while one occurrence is empty, I
would not call "the Cc: header" empty, so returning 'false' is the Right
Thing.

Anyway, I've replaced the text in the I-D with this:
    Testing whether a given header is either absent or doesn't contain
    any non-whitespace characters can be done using a negated "header"
    test:
        not header :matches "Cc" "?*"

...
>But I think you could say
>
>   not allof (exists "cc", header :matches "cc" "?*")

That's equivalent to what's in the -05 I-D.

Philip Guenther

To: Kjetil Torgrim Homme <[email-masked]>
Cc: [email-masked]
From: Philip Guenther <[email-masked]>
Subject: Re: 'header' test and whitespace 
Date: Tue, 29 Nov 2005 15:15:01 -0800
X-ok-sendmail.com: Yes
Sender: [email-masked]
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:[email-masked]?body=unsubscribe>

Kjetil Torgrim Homme <[email-masked]> writes:
>> > for the base specification, I would like a tiny change to make this
>>> a little more apparent:
>> 
>> >    For instance, the test `header :contains ["To", "Cc"]
>> > -  ["[email-masked]", "[email-masked]"]' is true if either the
>> > +  ["[email-masked]", "[email-masked]"]' is true if either a
>> >    To header or Cc header of the input message contains either of the
>> >    email addresses "[email-masked]" or "[email-masked]".
>> 
>> Seems like a good idea to me.
>
>I'm repeating it once more so Philip may take note of it :-).

Okay, okay, it's in now.

>also in the latest draft is this:
>
>   The preferred way to test whether a given header is either empty or
>   absent is to combine an "exists" test and a "header" test:
>
>           anyof (header :is "Cc" "", not exists "Cc")
>
>this will evaluate to true for:
>
>  Cc: [email-masked]
>  Cc:
>
>it may not be worth considering this rather degenerate case.  it seems
>to me Bcc is a more likely candidate for the stated test.  however, one
>way of stating the test correctly is:
>
>  not (header :matches "Cc" "?*")
>
>it's not much more convoluted, so I think it is worthwhile to change the
>"preferred way".

Ick.  I agree that your version matches the "plain meaning" of the
description better than the one currently in the doc, but it is an
imprecise description.  Hmm.  How about:

    Testing whether a given header is either absent or doesn't contain
    any non-whitespace characters can be done using a negated "header"
    test:
	not header :matches "Cc" "?*"

Philip Guenther

From: "Mark E. Mallett" <[email-masked]>
Date: Tue, 29 Nov 2005 12:23:50 -0500
To: Kjetil Torgrim Homme <[email-masked]>
Cc: [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

On Tue, Nov 29, 2005 at 12:28:57PM +0100, Kjetil Torgrim Homme wrote:
> 
> also in the latest draft is this:
> 
>    The preferred way to test whether a given header is either empty or
>    absent is to combine an "exists" test and a "header" test:
> 
>            anyof (header :is "Cc" "", not exists "Cc")
> 
> this will evaluate to true for:
> 
>   Cc: [email-masked]
>   Cc:
> 
> it may not be worth considering this rather degenerate case.  it seems
> to me Bcc is a more likely candidate for the stated test.  however, one
> way of stating the test correctly is:
> 
>   not (header :matches "Cc" "?*")
> 
> it's not much more convoluted, so I think it is worthwhile to change the
> "preferred way".

Parentheses aside... in my implementation at least, the "header" test
would return true (because of the non-empty 'cc'), and be notted to
return false.  So this wouldn't work.  In order for it to work, the
interior 'header' test would have to be influenced by the 'not' somehow,
so that it rearranged the logic to be:

   header :not :matches "Cc" "?*"

which would depend on how it treated the lack of a header field at all.

But I think you could say

   not allof (exists "cc", header :matches "cc" "?*")

mm

Subject: Re: 'header' test and whitespace
From: Kjetil Torgrim Homme <[email-masked]>
To: [email-masked]
Date: Tue, 29 Nov 2005 14:00:37 +0100
Sender: [email-masked]

On Tue, 2005-11-29 at 12:28 +0100, Kjetil Torgrim Homme wrote:
> [...] one way of stating the test correctly is:
> 
>   not (header :matches "Cc" "?*")
> 
> it's not much more convoluted, so I think it is worthwhile to change the
> "preferred way".

sorry, those parentheses are superfluous and should be left out.

  not header :matches "Cc" "?*"

-- 
Kjetil T.

Subject: Re: 'header' test and whitespace
From: Kjetil Torgrim Homme <[email-masked]>
To: [email-masked]
Date: Tue, 29 Nov 2005 12:28:57 +0100
Sender: [email-masked]

> > for the base specification, I would like a tiny change to make this
>> a little more apparent:
> 
> >    For instance, the test `header :contains ["To", "Cc"]
> > -  ["[email-masked]", "[email-masked]"]' is true if either the
> > +  ["[email-masked]", "[email-masked]"]' is true if either a
> >    To header or Cc header of the input message contains either of the
> >    email addresses "[email-masked]" or "[email-masked]".
> 
> Seems like a good idea to me.

I'm repeating it once more so Philip may take note of it :-).

also in the latest draft is this:

   The preferred way to test whether a given header is either empty or
   absent is to combine an "exists" test and a "header" test:

           anyof (header :is "Cc" "", not exists "Cc")

this will evaluate to true for:

  Cc: [email-masked]
  Cc:

it may not be worth considering this rather degenerate case.  it seems
to me Bcc is a more likely candidate for the stated test.  however, one
way of stating the test correctly is:

  not (header :matches "Cc" "?*")

it's not much more convoluted, so I think it is worthwhile to change the
"preferred way".
-- 
Kjetil T.

Date: Mon, 28 Nov 2005 19:25:13 -0500
From: Barry Leiba <[email-masked]>
To: [email-masked]
cc: [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

Barry

From: "Mark E. Mallett" <[email-masked]>
Date: Mon, 28 Nov 2005 17:20:09 -0500
To: Alexey Melnikov <[email-masked]>
Cc: Barry Leiba <[email-masked]>, [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

Yours,
-mm-

To: [email-masked]
Cc: [email-masked]
From: [email-masked]
Subject: I-D ACTION:draft-ietf-sieve-3028bis-05.txt 
Date: Mon, 28 Nov 2005 15:50:02 -0500
Sender: [email-masked]

--NextPart

	Title		: Sieve: An Email Filtering Language
	Author(s)	: T. Showalter, P. Guenther
	Filename	: draft-ietf-sieve-3028bis-05.txt
	Pages		: 38
	Date		: 2005-11-28
	
This document describes a language for filtering email messages at
   time of final delivery.  It is designed to be implementable on either
   a mail client or mail server.  It is meant to be extensible, simple,
   and independent of access protocol, mail architecture, and operating
   system.  It is suitable for running on a mail server where users may
   not be allowed to execute arbitrary programs, such as on black box
   Internet Message Access Protocol (IMAP) servers, as it has no
   variables, loops, or ability to shell out to external programs.

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-sieve-3028bis-05.txt

Internet-Drafts are also available by anonymous FTP. Login with the username
"anonymous" and a password of your e-mail address. After logging in,
type "cd internet-drafts" and then
	"get draft-ietf-sieve-3028bis-05.txt".

Send a message to:
	[email-masked].
In the body type:
	"FILE /internet-drafts/draft-ietf-sieve-3028bis-05.txt".

--NextPart
Content-Type: Multipart/Alternative; Boundary="OtherAccess"

--OtherAccess
Content-Type: Message/External-body;
	access-type="mail-server";
	server="[email-masked]"

Content-Type: text/plain
Content-ID:	<[email-masked]>

ENCODING mime
FILE /internet-drafts/draft-ietf-sieve-3028bis-05.txt

--OtherAccess
Content-Type: Message/External-body;
	name="draft-ietf-sieve-3028bis-05.txt";
	site="ftp.ietf.org";
	access-type="anon-ftp";
	directory="internet-drafts"

Content-Type: text/plain
Content-ID:	<[email-masked]>

--OtherAccess--

--NextPart--

Cc: Michael Haardt <[email-masked]>, [email-masked]
To: Alexey Melnikov <[email-masked]>
Date: Sat, 26 Nov 2005 10:32:10 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: Extension "envelope-auth"?
Sender: [email-masked]

> Michael Haardt wrote:

> >Hello,
> >
> >some time ago, we talked about "envelope-auth" to introduce "auth" to the
> >envelope test, which accesses the authenticated sender (AUTH parameter
> >in MAIL FROM, in case the mail system decides not to ignore it, and an
> >empty string otherwise).
> >
> >Is there a draft already or somebody working on it?
> >
> >
> If I remember correctly Ned has volunteered to author it.

Yes, that's correct.

				Ned

Cc: Ned Freed <[email-masked]>, [email-masked]
To: Kjetil Torgrim Homme <[email-masked]>
Date: Sat, 26 Nov 2005 08:45:35 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

> On Fri, 2005-11-25 at 15:53 -0800, Ned Freed wrote:
> > > the exact method used of RFC 2047 encoding doesn't have any semantics,
> > > either.
> >
> > In the abstract, maybe. But in practice it does. For example, it happens to
> > make perfect sense for me to filter out all messages that use the koi8-r
> > charset. I receive maybe 300 such messages every day, and they are without
> > exception spam.

> that will work until the spammers are savvy enough to switch to UTF-8 to
> avoid such filtering.  the correct test would check for code points, not
> encodings.

The same can be said for every other check you can think of - eventually
the spammers will adapt. That doesn't mean it isn't useful now, and it doesn't
mean other similar tests won't be useful in the future.

This is not, and should not be, a search for the FUSSP.

> > There are also cases where language can be inferred with reasonable reliability
> > from charset, and this can be very useful in some applications. (There often
> > isn't enough text in a header to analyze to determine the langauge being used.)

> yes, although I have received messages in Norwegian using GB2312
> encoding and messages in English using KOI8-R encoding, it's a safe bet
> that the sender of these messages understand Chinese and Russian
> respectively since they've set up their e-mail program to use these
> encodings.

> > > a discussion thread might have a Subject which switches back
> > > and forth between Q and B encoding, or in the length of encoded-words
> > > and hence the number of lines.  this is very apparent for us
> > > non-USans :-)
> >
> > The encoding probably doesn't matter, especially since it sometimes changes in
> > transit. Charset changes are much rarer.

> not in this neck of the woods.  different users will prefer UTF-8, ISO
> 8859-1 and ISO 8859-15, and the Subject will switch back and forth.

That's quite true here but beside the point. I'm talking about changes in
transit, not the use of various different stuff when messages are composed.
Indeed, the reason that you see such mixtures regularly (as do I) is because
such changes _aren't_ being made by composing and transfer agents - they leave
the original source alone.

> > > so I don't think it's appropriate to make :raw be :halfraw.  the CR LF
> > > is actually a part of the raw header.
> >
> > I disagree. Folding points change all the time, they are specifically defined
> > not to have semantics, and I don't believe I've ever seen a case where I wanted
> > a test that is sensitive to CRLFs. The same cannot be said for encoded words
> > and trailing spaces.

> okay, fine.  I was thinking abut cases where you want to repeat it back
> at the sender, e.g.

>   vacation :subject text:
> Auto: I'm away from office
>  (was: ${subject} )
> .
> ;

> where the fact that the CRLFs are included in ${subject} makes it
> unnecessary to worry about folding of overlong subjects.  the vacation
> draft should perhaps be explicit in that Subject must be folded
> appropriately?

Wow, I had never even considered putting explicit folding points into a
vacation subject argument. Given that there can be substitutions and encoded
word generation and who knows what else happening it seems like a really bad
idea for a script to do this explicitly, but I suppose the vacation draft needs
to say that (a) The subjects and other headers in generated vacation responses
have to be properly folded and (b) CRLFs in subject arguments need to be
handled sensibly. In particular, the case of
<text-with-no-space><CRLF><text-with-no-space> has to be handled in a way that
doesn't cause an illegal header to be generated. I think I'll say something
like "CRLFs in :subject arguments MAY simply be removed but MUST be handled
in a fashion that prevents an illegal header field from being produced."

> > > while we're at it, what do we do about headers which can have multiple
> > > values, e.g. "Cc"?  (multiple headers is deprecated in 2822, but must be
> > > supported.)  I don't have a good suggestion.  the naive approach is to
> > > concatenate them as if they were simply separated by CR LF, but for "Cc"
> > > you would really want to include a comma in the delimiter as well.  the
> > > other option is to say that the first matching header is used.  this
> > > sits well with short-circuiting logic, but means it's impossible to
> > > capture the complete value of the header.
> >
> > Simple: You test all the values as separate fields. Sieve tests already allow for
> > a list of fields but there's an implicit list even when there's only a single
> > field name specified.

> yes, "but [this] means it's impossible to capture the complete value of
> the header", "*" will only fetch the contents of the first one.

Yep.

> perhaps
> a loop construct for the address test would be a more appropriate
> solution to that problem?

>   for.every.address ["To", "Cc"] { block }

Yes, seems reasonable. In fact I once argued that the concept of a result
generator might make sense in sieve - the Icon language uses this to great
advantage in a bunch of different ways.

> this can of course wait until we see the need.  for the base
> specification, I would like a tiny change to make this a little more
> apparent:

>    For instance, the test `header :contains ["To", "Cc"]
> -  ["[email-masked]", "[email-masked]"]' is true if either the
> +  ["[email-masked]", "[email-masked]"]' is true if either a
>    To header or Cc header of the input message contains either of the
>    email addresses "[email-masked]" or "[email-masked]".

Seems like a good idea to me.

> > > > Yes, I'm afraid so. Perhaps something like rawheader? (I believe the header
> > > > test is the only one for which :raw makes sense.)

> I'd like it for address, too.  this is the difference between
> "xn--srlandslaget-vjb.no" and "sørlandslaget.no".  okay, so this isn't
> in the spec today, but we might as well be ready for it.

Agreed, and it may be closer than you think given how the meeting at the last
IETF on i18n stuff in email went.

> > > what happens if you add a :raw argument and upload to today's
> > > implementations?  will they reject during upload?  will they ignore it
> > > during runtime?  will they bomb during runtime?
> >
> > Our implementation will return a runtime error. I believe this is the correct
> > behavior. We don't check during upload - our sieves are typically provisioned
> > via LDAP and we have no control over what tools are used to insert them into
> > the directory.
> >
> > And yes, this makes error reporting a real challenge.
> >
> > > IMHO it's okay as long as it doesn't cause a runtime error.  (Cyrus 2.2
> > > will reject upload, I haven't checked others.)
> >
> > This is just another extension, so I don't see why causing a runtime
> > error is a problem.

> right, that was my point.  if you didn't raise a runtime error, we might
> get away with not declaring it an extension.  but you do, so we don't.

OK, seems like we're in agreement then.

				Ned

Subject: Re: 'header' test and whitespace
From: Kjetil Torgrim Homme <[email-masked]>
To: Ned Freed <[email-masked]>
Cc: [email-masked]
Date: Sat, 26 Nov 2005 09:08:50 +0100
Sender: [email-masked]

On Fri, 2005-11-25 at 15:53 -0800, Ned Freed wrote:
> > the exact method used of RFC 2047 encoding doesn't have any semantics,
> > either.
> 
> In the abstract, maybe. But in practice it does. For example, it happens to
> make perfect sense for me to filter out all messages that use the koi8-r 
> charset. I receive maybe 300 such messages every day, and they are without
> exception spam.

that will work until the spammers are savvy enough to switch to UTF-8 to
avoid such filtering.  the correct test would check for code points, not
encodings.

> There are also cases where language can be inferred with reasonable reliability
> from charset, and this can be very useful in some applications. (There often
> isn't enough text in a header to analyze to determine the langauge being used.)

yes, although I have received messages in Norwegian using GB2312
encoding and messages in English using KOI8-R encoding, it's a safe bet
that the sender of these messages understand Chinese and Russian
respectively since they've set up their e-mail program to use these
encodings.

> > a discussion thread might have a Subject which switches back
> > and forth between Q and B encoding, or in the length of encoded-words
> > and hence the number of lines.  this is very apparent for us
> > non-USans :-)
> 
> The encoding probably doesn't matter, especially since it sometimes changes in
> transit. Charset changes are much rarer.

not in this neck of the woods.  different users will prefer UTF-8, ISO
8859-1 and ISO 8859-15, and the Subject will switch back and forth.

> > so I don't think it's appropriate to make :raw be :halfraw.  the CR LF
> > is actually a part of the raw header.
> 
> I disagree. Folding points change all the time, they are specifically defined
> not to have semantics, and I don't believe I've ever seen a case where I wanted
> a test that is sensitive to CRLFs. The same cannot be said for encoded words
> and trailing spaces.

okay, fine.  I was thinking abut cases where you want to repeat it back
at the sender, e.g.

  vacation :subject text:
Auto: I'm away from office
 (was: ${subject} )
.
;

where the fact that the CRLFs are included in ${subject} makes it
unnecessary to worry about folding of overlong subjects.  the vacation
draft should perhaps be explicit in that Subject must be folded
appropriately?

> > while we're at it, what do we do about headers which can have multiple
> > values, e.g. "Cc"?  (multiple headers is deprecated in 2822, but must be
> > supported.)  I don't have a good suggestion.  the naive approach is to
> > concatenate them as if they were simply separated by CR LF, but for "Cc"
> > you would really want to include a comma in the delimiter as well.  the
> > other option is to say that the first matching header is used.  this
> > sits well with short-circuiting logic, but means it's impossible to
> > capture the complete value of the header.
> 
> Simple: You test all the values as separate fields. Sieve tests already allow for
> a list of fields but there's an implicit list even when there's only a single
> field name specified.

yes, "but [this] means it's impossible to capture the complete value of
the header", "*" will only fetch the contents of the first one.  perhaps
a loop construct for the address test would be a more appropriate
solution to that problem?

  for.every.address ["To", "Cc"] { block }

this can of course wait until we see the need.  for the base
specification, I would like a tiny change to make this a little more
apparent:

   For instance, the test `header :contains ["To", "Cc"]
-  ["[email-masked]", "[email-masked]"]' is true if either the
+  ["[email-masked]", "[email-masked]"]' is true if either a
   To header or Cc header of the input message contains either of the
   email addresses "[email-masked]" or "[email-masked]".

> > > Yes, I'm afraid so. Perhaps something like rawheader? (I believe the header
> > > test is the only one for which :raw makes sense.)

I'd like it for address, too.  this is the difference between
"xn--srlandslaget-vjb.no" and "sørlandslaget.no".  okay, so this isn't
in the spec today, but we might as well be ready for it.

> > what happens if you add a :raw argument and upload to today's
> > implementations?  will they reject during upload?  will they ignore it
> > during runtime?  will they bomb during runtime?
> 
> Our implementation will return a runtime error. I believe this is the correct
> behavior. We don't check during upload - our sieves are typically provisioned
> via LDAP and we have no control over what tools are used to insert them into
> the directory.
> 
> And yes, this makes error reporting a real challenge.
> 
> > IMHO it's okay as long as it doesn't cause a runtime error.  (Cyrus 2.2
> > will reject upload, I haven't checked others.)
> 
> This is just another extension, so I don't see why causing a runtime
> error is a problem.

right, that was my point.  if you didn't raise a runtime error, we might
get away with not declaring it an extension.  but you do, so we don't.

-- 
Kjetil T.

Cc: Ned Freed <[email-masked]>, [email-masked]
To: Kjetil Torgrim Homme <[email-masked]>
Date: Fri, 25 Nov 2005 15:53:28 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

> On Fri, 2005-11-25 at 08:41 -0800, Ned Freed wrote:
> > Yes. I don't view this as part of the unfolding algorithm, however. But now
> > that you mention it, a better way to describe this is to do the unfolding
> > part first and then remove leading and trailing spaces. So the steps become:
> >
> > (1) Remove all CRLFs.
> >
> > (2) Remove leading and trailing spaces.
> >
> > (3) Decode RFC 2047 and convert to utf-8.

> if we're going to mention 2047, we should also mention that RFC 2231
> applies for some headers.  although it seems to me that using a
> bastardised 2047 is the deployed norm for Content-Disposition and
> friends, that's not correct according to the specifications, and being
> more explicit about it might help conformance to spec.

> > The last two steps should be skipped in :raw mode. (The first step is retained
> > because folding points aren't supposed to have any semantics and are known to
> > change unpredictably. The same cannot be said for spaces or encoded words.)

> the exact method used of RFC 2047 encoding doesn't have any semantics,
> either.

In the abstract, maybe. But in practice it does. For example, it happens to
make perfect sense for me to filter out all messages that use the koi8-r 
charset. I receive maybe 300 such messages every day, and they are without
exception spam.

There are also cases where language can be inferred with reasonable reliability
from charset, and this can be very useful in some applications. (There often
isn't enough text in a header to analyze to determine the langauge being used.)

> a discussion thread might have a Subject which switches back
> and forth between Q and B encoding, or in the length of encoded-words
> and hence the number of lines.  this is very apparent for us
> non-USans :-)

The encoding probably doesn't matter, especially since it sometimes changes in
transit. Charset changes are much rarer.

> so I don't think it's appropriate to make :raw be :halfraw.  the CR LF
> is actually a part of the raw header.

I disagree. Folding points change all the time, they are specifically defined
not to have semantics, and I don't believe I've ever seen a case where I wanted
a test that is sensitive to CRLFs. The same cannot be said for encoded words
and trailing spaces.

> while we're at it, what do we do about headers which can have multiple
> values, e.g. "Cc"?  (multiple headers is deprecated in 2822, but must be
> supported.)  I don't have a good suggestion.  the naive approach is to
> concatenate them as if they were simply separated by CR LF, but for "Cc"
> you would really want to include a comma in the delimiter as well.  the
> other option is to say that the first matching header is used.  this
> sits well with short-circuiting logic, but means it's impossible to
> capture the complete value of the header.

Simple: You test all the values as separate fields. Sieve tests already allow for
a list of fields but there's an implicit list even when there's only a single
field name specified.

> > > I am personally Ok with adding :raw to the base spec, but do we need a
> > > new capability?
> >
> > Yes, I'm afraid so. Perhaps something like rawheader? (I believe the header
> > test is the only one for which :raw makes sense.)

> what happens if you add a :raw argument and upload to today's
> implementations?  will they reject during upload?  will they ignore it
> during runtime?  will they bomb during runtime?

Our implementation will return a runtime error. I believe this is the correct
behavior. We don't check during upload - our sieves are typically provisioned
via LDAP and we have no control over what tools are used to insert them into
the directory.

And yes, this makes error reporting a real challenge.

> IMHO it's okay as long as it doesn't cause a runtime error.  (Cyrus 2.2
> will reject upload, I haven't checked others.)

This is just another extension, so I don't see why causing a runtime
error is a problem.

> the behaviour of "header" is under-specified in the current spec, and
> deployed implementations probably deviating behaviour.  the more
> detailed specs we're discussing here might make many of them obviously
> non-conforming where they were only arguably non-conforming before (i.e.
> not performing according to intent).  but is it important?  the number
> of capabilities makes life harder for both server and client
> implementors, and we should try to limit the number of them as much as
> possible.

I disagree with this as well. Additional new capabilities are nowhere as big
a problem as nailing things down in ways that break current behavior. To be
blunt, if this specification evolves to a point where our deployed sieve
scripts are incompatible with it, I'll have no choice but to stop supporting
sieve as defined by the IETF.

				Ned

To: [email-masked]
Subject: Re: 'header' test and whitespace
From: Michael Haardt <[email-masked]>
Date: Sat, 26 Nov 2005 00:57:22 +0100
Sender: [email-masked]

> > > I am personally Ok with adding :raw to the base spec, but do we need a
> > > new capability?
> > 
> > Yes, I'm afraid so. Perhaps something like rawheader? (I believe the header
> > test is the only one for which :raw makes sense.)
>
> what happens if you add a :raw argument and upload to today's
> implementations?  will they reject during upload?  will they ignore it
> during runtime?  will they bomb during runtime?

Adding something completely new like that sounds like a typical extension
to me, and indeed a rawheader test may be a better way than adding a flag.

When I mentioned it, all I wanted was to make sure we don't put something
in the way of being able to create that extension.  I don't know if
anybody will ever specify it, but I feel we should be able to, should
the need arise.

> the behaviour of "header" is under-specified in the current spec, and
> deployed implementations probably deviating behaviour.  the more
> detailed specs we're discussing here might make many of them obviously
> non-conforming where they were only arguably non-conforming before (i.e.
> not performing according to intent).  but is it important?  the number
> of capabilities makes life harder for both server and client
> implementors, and we should try to limit the number of them as much as
> possible.

Current implementations probably specify conforming to RFC 3028,
and that is not going to change.  RFC 3028 gives too much freedom,
mostly not intentionally, and that's a problem.  Most implementations
probably need minor tweaks to conform to the new standard, and they
will still conform to RFC 3028.  Nobody likes changes, but everybody
asks for interoperability.  In this case, it's a small price to pay.

The number of extensions is a problem indeed, because they reduce
interoperability.  But if you required a "full" implementation on systems
that currently offer only a minimal implementation, perhaps they wouldn't
be using Sieve at all, being even less interoperable.

Michael

Subject: Re: 'header' test and whitespace
From: Kjetil Torgrim Homme <[email-masked]>
To: Ned Freed <[email-masked]>
Cc: [email-masked]
Date: Fri, 25 Nov 2005 23:56:45 +0100
Sender: [email-masked]

On Fri, 2005-11-25 at 08:41 -0800, Ned Freed wrote:
> Yes. I don't view this as part of the unfolding algorithm, however. But now
> that you mention it, a better way to describe this is to do the unfolding
> part first and then remove leading and trailing spaces. So the steps become:
> 
> (1) Remove all CRLFs.
> 
> (2) Remove leading and trailing spaces.
> 
> (3) Decode RFC 2047 and convert to utf-8.

if we're going to mention 2047, we should also mention that RFC 2231
applies for some headers.  although it seems to me that using a
bastardised 2047 is the deployed norm for Content-Disposition and
friends, that's not correct according to the specifications, and being
more explicit about it might help conformance to spec.

> The last two steps should be skipped in :raw mode. (The first step is retained
> because folding points aren't supposed to have any semantics and are known to
> change unpredictably. The same cannot be said for spaces or encoded words.)

the exact method used of RFC 2047 encoding doesn't have any semantics,
either.  a discussion thread might have a Subject which switches back
and forth between Q and B encoding, or in the length of encoded-words
and hence the number of lines.  this is very apparent for us
non-USans :-)

so I don't think it's appropriate to make :raw be :halfraw.  the CR LF
is actually a part of the raw header.

while we're at it, what do we do about headers which can have multiple
values, e.g. "Cc"?  (multiple headers is deprecated in 2822, but must be
supported.)  I don't have a good suggestion.  the naive approach is to
concatenate them as if they were simply separated by CR LF, but for "Cc"
you would really want to include a comma in the delimiter as well.  the
other option is to say that the first matching header is used.  this
sits well with short-circuiting logic, but means it's impossible to
capture the complete value of the header.

> > I am personally Ok with adding :raw to the base spec, but do we need a
> > new capability?
> 
> Yes, I'm afraid so. Perhaps something like rawheader? (I believe the header
> test is the only one for which :raw makes sense.)

what happens if you add a :raw argument and upload to today's
implementations?  will they reject during upload?  will they ignore it
during runtime?  will they bomb during runtime?

IMHO it's okay as long as it doesn't cause a runtime error.  (Cyrus 2.2
will reject upload, I haven't checked others.)

the behaviour of "header" is under-specified in the current spec, and
deployed implementations probably deviating behaviour.  the more
detailed specs we're discussing here might make many of them obviously
non-conforming where they were only arguably non-conforming before (i.e.
not performing according to intent).  but is it important?  the number
of capabilities makes life harder for both server and client
implementors, and we should try to limit the number of them as much as
possible.

-- 
Kjetil T.

Cc: Ned Freed <[email-masked]>, Barry Leiba <[email-masked]>, [email-masked]
To: Alexey Melnikov <[email-masked]>
Date: Fri, 25 Nov 2005 08:41:55 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

> Ned Freed wrote:

> >> I see from Alexey's minutes that I was supposed to post the text that
> >> I proposed.  I didn't remember that; sorry.  Philip started the
> >> discussion, but didn't post the text.  I gave Philip XML, and here's
> >> what I suggested:
> >
> >> <t>
> >> Because the meaning of leading and trailing whitespace characters in
> >> header
> >> fields is ambiguous, and their survival in message transport and
> >> processing
> >> is inconsistent, ALL handling of message headers in Sieve MUST normalize
> >> the header field values.  The normalization is similar to, but not
> >> the same
> >> as, unfolding (see RFC2822),
> >
> > I think the unfolding part needs to be the same as what's in RFC 2822.

> I agree.

> > and is done as follows:
> >
> >> <list style="number">
> >>    <t>
> >>      Remove leading and trailing whitespace characters from each line of
> >>      the header field (multiple lines, in the case of multi-line
> >> continuation).
> >>    </t>
> >
> This step is actually not mentioned in RFC 2822.

Yes. I don't view this as part of the unfolding algorithm, however. But now
that you mention it, a better way to describe this is to do the unfolding
part first and then remove leading and trailing spaces. So the steps become:

(1) Remove all CRLFs.

(2) Remove leading and trailing spaces.

(3) Decode RFC 2047 and convert to utf-8.

The last two steps should be skipped in :raw mode. (The first step is retained
because folding points aren't supposed to have any semantics and are known to
change unpredictably. The same cannot be said for spaces or encoded words.)

> >>    <t>
> >>      Remove the delimiting CRLF from each line.
> >>    </t>
> >>    <t>
> >>      Catenate the lines in order, inserting one ASCII space character
> >> (0x20)
> >>      between each pair.
> >
> >
> > This makes the unfolding different from what's in RFC 2822. I think
> > this is a
> > mistake. There should not be any "insert space" operation here - RFC 2822
> > section 2.2.3 simply calls for CRLFs to be removed.

> [...]

> >> Note that I didn't suggest RFC2047-decoding, but I think that's a
> >> reasonable
> >> addition to this.  Alternatively, we could specify that strings be
> >> decoded
> >> in comparisons (perhaps specified by an option like ":decode" or
> >> ":raw").
> >
> > A :raw option makes sense. I actually have no problem with adding it
> > to the
> > base specification but others may disagree.

> I am personally Ok with adding :raw to the base spec, but do we need a
> new capability?

Yes, I'm afraid so. Perhaps something like rawheader? (I believe the header
test is the only one for which :raw makes sense.)

				Ned

Date: Fri, 25 Nov 2005 14:08:44 +0000
From: Alexey Melnikov <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Re: Draft minutes from Vancouver
Sender: [email-masked]

Barry Leiba wrote:

> The minutes look good to me.

Ok, I've uploaded minutes to the ietf.org site
(<https://datatracker.ietf.org/public/meeting_materials.cgi?meeting_num=64>)

There is still time to correct them.

Date: Fri, 25 Nov 2005 13:57:25 +0000
From: Alexey Melnikov <[email-masked]>
To: Michael Haardt <[email-masked]>
CC: [email-masked]
Subject: Re: Draft minutes from Vancouver
Sender: [email-masked]

Michael Haardt wrote:

>>8) Do we want to allow suppression of identical notifications?
>>
>>Greg: the answer might depend on whether we need to provide 
>>confidentiality. No consensus was reached, so the discussion should 
>>continue of the mailing list.
>>    
>>
>Greg: Please elaborate.  What do you mean by "confidentiality" in this
>context?
>
>Are "identical notifications" multiple executed notify actions with
>identical parameters in one script? Like:
>
>notify :method "mailto:[email-masked]";
>notify :method "mailto:[email-masked]";
>  
>
Yes (when all parameters are the same after performing variable 
expansion, if variables are also used).

>If the method is required,
>
It is not.

>and notify is a noop if none is given, then
>why the tagged argument and not a positional argument? Just curious.
>  
>
I was trying to keep backward compatibility with the deployed code.

Date: Fri, 25 Nov 2005 13:32:44 +0000
From: Alexey Melnikov <[email-masked]>
To: Ned Freed <[email-masked]>
CC: Barry Leiba <[email-masked]>, [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

Ned Freed wrote:

>> I see from Alexey's minutes that I was supposed to post the text that
>> I proposed.  I didn't remember that; sorry.  Philip started the
>> discussion, but didn't post the text.  I gave Philip XML, and here's
>> what I suggested:
>
>> <t>
>> Because the meaning of leading and trailing whitespace characters in 
>> header
>> fields is ambiguous, and their survival in message transport and 
>> processing
>> is inconsistent, ALL handling of message headers in Sieve MUST normalize
>> the header field values.  The normalization is similar to, but not 
>> the same
>> as, unfolding (see RFC2822),
>
> I think the unfolding part needs to be the same as what's in RFC 2822.

I agree.

> and is done as follows:
>
>> <list style="number">
>>    <t>
>>      Remove leading and trailing whitespace characters from each line of
>>      the header field (multiple lines, in the case of multi-line 
>> continuation).
>>    </t>
>
This step is actually not mentioned in RFC 2822.

>>    <t>
>>      Remove the delimiting CRLF from each line.
>>    </t>
>>    <t>
>>      Catenate the lines in order, inserting one ASCII space character 
>> (0x20)
>>      between each pair.
>
>
> This makes the unfolding different from what's in RFC 2822. I think 
> this is a
> mistake. There should not be any "insert space" operation here - RFC 2822
> section 2.2.3 simply calls for CRLFs to be removed.

[...]

>> Note that I didn't suggest RFC2047-decoding, but I think that's a 
>> reasonable
>> addition to this.  Alternatively, we could specify that strings be 
>> decoded
>> in comparisons (perhaps specified by an option like ":decode" or 
>> ":raw").
>
> A :raw option makes sense. I actually have no problem with adding it 
> to the
> base specification but others may disagree.

I am personally Ok with adding :raw to the base spec, but do we need a 
new capability?

Date: Thu, 24 Nov 2005 21:37:28 -0500
From: Tony Hansen <[email-masked]>
CC: [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

Ned Freed wrote:
> 
>> Because the meaning of leading and trailing whitespace characters
>> in header fields is ambiguous, and their survival in message
>> transport and processing is inconsistent, ALL handling of message
>> headers in Sieve MUST normalize the header field values. The
>> normalization is similar to, but not the same as, unfolding (see
>> RFC2822),
> 
> I think the unfolding part needs to be the same as what's in RFC 2822.

ditto

	Tony Hansen
	[email-masked]

Cc: [email-masked]
To: Barry Leiba <[email-masked]>
Date: Thu, 24 Nov 2005 17:30:47 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

> I see from Alexey's minutes that I was supposed to post the text that
> I proposed.  I didn't remember that; sorry.  Philip started the
> discussion, but didn't post the text.  I gave Philip XML, and here's
> what I suggested:

> <t>
> Because the meaning of leading and trailing whitespace characters in header
> fields is ambiguous, and their survival in message transport and processing
> is inconsistent, ALL handling of message headers in Sieve MUST normalize
> the header field values.  The normalization is similar to, but not the same
> as, unfolding (see RFC2822),

I think the unfolding part needs to be the same as what's in RFC 2822.

 and is done as follows:
> <list style="number">
>    <t>
>      Remove leading and trailing whitespace characters from each line of
>      the header field (multiple lines, in the case of multi-line continuation).
>    </t>
>    <t>
>      Remove the delimiting CRLF from each line.
>    </t>
>    <t>
>      Catenate the lines in order, inserting one ASCII space character (0x20)
>      between each pair.

This makes the unfolding different from what's in RFC 2822. I think this is a
mistake. There should not be any "insert space" operation here - RFC 2822
section 2.2.3 simply calls for CRLFs to be removed.

>    </t>
> </list>
> </t>

> <t>
> To show how this normalization works, we use the character "~" (tilde) to
> represent the ASCII space character in the following example.
> This normalization will result in all of the following normalizing to the
> same value for the subject field, "a~b~~~c~d":
> <list style="empty">
>    <t>
>      Subject:~a~b~~~c~d
>    </t>
>    <t>
>      Subject:a~b~~~c~d~
>    </t>
>    <t>
>      Subject:a~b~~~c~
>      <vspace/>
>      ~~~~d~~
>    </t>
>    <t>
>      Subject:~~~~~a
>      <vspace/>
>      ~~~~b~~~c~~~~~
>      <vspace/>
>      ~~~~d
>    </t>
>    <t>
>      Subject:~a
>      <vspace/>
>      ~b~~~c
>      <vspace/>
>      ~d
>    </t>
> </list>
> </t>

I didn't bother going through all this.

> Note that I didn't suggest RFC2047-decoding, but I think that's a reasonable
> addition to this.  Alternatively, we could specify that strings be decoded
> in comparisons (perhaps specified by an option like ":decode" or ":raw").

A :raw option makes sense. I actually have no problem with adding it to the
base specification but others may disagree.

				Ned

Date: Thu, 24 Nov 2005 15:23:56 +0000
From: Alexey Melnikov <[email-masked]>
To: Michael Haardt <[email-masked]>
CC: [email-masked]
Subject: Re: Extension "envelope-auth"?
Sender: [email-masked]

Michael Haardt wrote:

>Hello,
>
>some time ago, we talked about "envelope-auth" to introduce "auth" to the
>envelope test, which accesses the authenticated sender (AUTH parameter
>in MAIL FROM, in case the mail system decides not to ignore it, and an
>empty string otherwise).
>
>Is there a draft already or somebody working on it?
>  
>
If I remember correctly Ned has volunteered to author it.

Date: Wed, 23 Nov 2005 22:26:25 -0500
From: Barry Leiba <[email-masked]>
To: [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

I see from Alexey's minutes that I was supposed to post the text that
I proposed.  I didn't remember that; sorry.  Philip started the
discussion, but didn't post the text.  I gave Philip XML, and here's
what I suggested:

<t>
Because the meaning of leading and trailing whitespace characters in header
fields is ambiguous, and their survival in message transport and processing
is inconsistent, ALL handling of message headers in Sieve MUST normalize
the header field values.  The normalization is similar to, but not the same
as, unfolding (see RFC2822), and is done as follows:
<list style="number">
   <t>
     Remove leading and trailing whitespace characters from each line of
     the header field (multiple lines, in the case of multi-line continuation).
   </t>
   <t>
     Remove the delimiting CRLF from each line.
   </t>
   <t>
     Catenate the lines in order, inserting one ASCII space character (0x20)
     between each pair.
   </t>
</list>
</t>

<t>
To show how this normalization works, we use the character "~" (tilde) to
represent the ASCII space character in the following example.
This normalization will result in all of the following normalizing to the
same value for the subject field, "a~b~~~c~d":
<list style="empty">
   <t>
     Subject:~a~b~~~c~d
   </t>
   <t>
     Subject:a~b~~~c~d~
   </t>
   <t>
     Subject:a~b~~~c~
     <vspace/>
     ~~~~d~~
   </t>
   <t>
     Subject:~~~~~a
     <vspace/>
     ~~~~b~~~c~~~~~
     <vspace/>
     ~~~~d
   </t>
   <t>
     Subject:~a
     <vspace/>
     ~b~~~c
     <vspace/>
     ~d
   </t>
</list>
</t>

Note that I didn't suggest RFC2047-decoding, but I think that's a reasonable
addition to this.  Alternatively, we could specify that strings be decoded
in comparisons (perhaps specified by an option like ":decode" or ":raw").

Barry

Date: Wed, 23 Nov 2005 22:21:07 -0500
From: Barry Leiba <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Re: Draft minutes from Vancouver
Sender: [email-masked]

The minutes look good to me.

Barry

Date: Wed, 23 Nov 2005 22:20:31 -0500
From: Barry Leiba <[email-masked]>
To: [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

> You lost me somewhere.  Do you mean:
> 
> Headers accessed by Sieve are always: Unfolded, stripped of heading and
> trailing white space and MIME-decoded?

I didn't lose you; you got it, yes.

> If so, that would make a raw header test/comparison impossible.

OK; I'm happy to have an explicit "leave it raw" function.  Lacking that,
I would like to see them normalized.

Barry

Date: Thu, 24 Nov 2005 00:15:52 +0100
From: Michael Haardt <[email-masked]>
To: [email-masked]
Subject: Extension "envelope-auth"?
Sender: [email-masked]

Hello,

some time ago, we talked about "envelope-auth" to introduce "auth" to the
envelope test, which accesses the authenticated sender (AUTH parameter
in MAIL FROM, in case the mail system decides not to ignore it, and an
empty string otherwise).

Is there a draft already or somebody working on it?

Michael

Date: Wed, 23 Nov 2005 23:55:10 +0100
From: Michael Haardt <[email-masked]>
To: [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

On Tue, Nov 22, 2005 at 12:27:38PM -0500, Barry Leiba wrote:
> > Both UCB mail and mutt do compress whitespace at fold points for the
> > overview and show all whitespace at fold points when displaying the
> > message, including the newline.  Both surprises me, and I do not like it.
> 
> It's that inconsistency that prompts this suggestion.  Behaviour is so 
> varied
> that I'd rather see us define something predictable.

"Varied" is a nice word for what I consider a "bug".  Unfolding as
specified in RFC 2822 is easy to understand and logical to me, yet
two MUAs decide to break it in two different ways.  I agree we should
say something about it.

> That said, there's Kjetil's comment:
> 
> > so I don't think it matters much in practice.  so my conclusion is:
> > don't confuse matters even more by adding Sieve specific unfolding
> > rules.
> 
> There's definitely something to be said for us to just point to the RFC2822
> unfolding rule, and not define our own.

You have my vote for that.

> I'll be happy with whatever decision we make about the whitespace at the 
> fold
> points, but I prefer compressing it to one space there.  I will NOT be happy
> if we don't strip leading and trailing whitespace on the overall unfolded
> field value.  Moreover, I think another important point in what I suggested
> is that this stripping be done ANY TIME Sieve touches a header field value,
> NOT JUST IN COMPARISONS.  If we stick the value into a variable and then
> compare against the variable, the behaviour must be the same as if we
> compare against the header field value directly, which means that the
> leading and trailing whitespace must be stripped when the value is put into
> the variable in the first place.

You lost me somewhere.  Do you mean:

Headers accessed by Sieve are always: Unfolded, stripped of heading and
trailing white space and MIME-decoded?

If so, that would make a raw header test/comparison impossible.  I suggest
that specific tests and actions define if they do the above, and I have
no problems if variable assignments do, but a requirement in the base spec
that all operations on headers must work that way sounds limiting to me.

Michael

To: [email-masked]
Subject: Re: Draft minutes from Vancouver
From: Michael Haardt <[email-masked]>
Date: Wed, 23 Nov 2005 23:09:38 +0100
Sender: [email-masked]

> 8) Do we want to allow suppression of identical notifications?
>
> Greg: the answer might depend on whether we need to provide 
> confidentiality. No consensus was reached, so the discussion should 
> continue of the mailing list.

Greg: Please elaborate.  What do you mean by "confidentiality" in this
context?

Are "identical notifications" multiple executed notify actions with
identical parameters in one script? Like:

notify :method "mailto:[email-masked]";
notify :method "mailto:[email-masked]";

If the method is required, and notify is a noop if none is given, then
why the tagged argument and not a positional argument? Just curious.

Michael

Date: Wed, 23 Nov 2005 19:56:38 +0000
From: Alexey Melnikov <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Draft minutes from Vancouver
Sender: [email-masked]

Hi folks,
Below are the draft minutes I've produced from the Jabber logs. (Thanks 
to Tony Hansen for scribing in Jabber!) Please send any comments on 
correctness/completeness. Editorial comments are welcome as well.
=========

The meeting has started with a quick review of documents ready for IESG 
writeup (or nearly ready). The vacation extension has two minor 
outstanding issues: clarification on how hash should be constructed when 
some tagged arguments like :subject are omitted; default auto reply 
subject when the original message had no subject.

Scott Hollenbeck has asked what was the resolution on "multiple executed 
vacation actions in a script". Alexey has replied that after a long 
discussion on the mailing list there was no change in the behaviour of 
the vacation action.

Spamtest, imap flags, relational extensions are ready for IESG writeup.

Edit header needs to say something about stripping leading/trailing 
spaces, but it is done otherwise. Barry has mentioned that the 
relational draft got bounced by Internet Draft editor, resubmitted.

The body draft is waiting for resolution on comparators in the base 
document, but otherwise is done. Once comparator issues are addressed, 
the body can be revised in a couple of days.

IESG has raised a discuss comment on Sieve variables: ":lower" and 
":upper" were underspecified, the vague text about using comparators is 
not good enough to implement. Two ways to solve the issue:

a). just say that :lower and :upper only affect US-ASCII subset, other 
characters are not affected;

b). do stringprep like approach (full Unicode).

Several people are in favour of US-ASCII-only approach, which is 
perceived to be quicker and will satisfy IESG. 6 people in the room are 
in favour of US-ASCII-only approach, plus some more in jabber. No people 
objecting. Need to confirm the decision on the mailing list.

Alexey has expressed his desire to get resolution on comparators by the 
end of November.

There are several open issues with the base document:

1). ABNF for match types (done)

2). Matching uses glob characters, but is not fully specified in the 
document. Need to clarify that matching depends on substring operation 
of collation.

3). Base spec and variables: Clarify that when matching is done then 
pieces of the original value are returned in match variables, not the 
result of applying the selected comparator.

4). Stripping leading/trailing whitespaces in the relational draft - 
text needs to be moved to the base spec.

Short discussion about Barry's proposal to string leading/trailing 
whitespaces any time a header field is touched. No objections from 
people who've seen the new text (Alexey, Philip). Barry will send the 
text to the mailing list.

Philip has promised a new revision of base document by November 18th.

Alexey has talked about the notification draft. Received many comments, 
much more than expected :-). Separate documents will be created for 
different Sieve notification methods.

Alexey & Barry will co-edit the main notification document. Barry & 
Michael will co-edit SMTP notification draft. Alexey will do XMPP, but 
need a co-editor. Peter Saint-Andre has agreed to co-edit. No editor for 
SMS notifications, but Stephane might be working on the drafts.

Discussion about SMS has followed: what does it mean to implement SMS 
notifications, what kind of payload is used (do we need multiple 
different ones?), what kind of parameters are needed, how payload is 
generated and delivered, etc. Ray Cromwell has mentioned that there are 
a lot of requests to limit number of SMS generated per day, in order to 
limit cost. Discussion on whether URIs are the best way to specify 
notification methods and whether a generic Lemonade notification method 
should be defined. Discussion on complexity of different SMS gateways - 
different gateways need different parameters, in most cases users of 
Sieve scripts wouldn't care about such parameters. Consensus from the 
group that it is too premature to discuss details until we see a first 
revision of the SMS notification draft.

A detailed discussion about current issues in the base Sieve 
Notifications document has followed. Alexey has presented open issues.

1) Many people have requested to remove "denotify", it will be removed 
in the next revision, as there were no requests to keep it.

2) Comments from Jabber that "mailto" should be a mandatory to implement 
notification method, as Sieve engines already able to send mail.

3) Need a way to extract textual message body. Kjetil's suggestion will 
not work, as "body" extension explicitly prohibits setting variables on 
body test. Barry has mentioned that we need the ability to send the 
whole body as well as first starting bytes.

Alexey has asked Philip if "body" can be changed to relax the 
restriction? Philip said "no", "body" is already widely deployed. If 
body extraction is only useful for Sieve notification, we can add it to 
the Sieve notifications document. Otherwise we need a separate 
extension. Decision to bring the issue to the mailing list.

4) Can notification method parameter be optional (i.e. if not present - 
use site specific default. If no default - noop)?

Barry: keep it optional; if there is no default - "notify" action is a 
noop. No objections from the room.

5) What should happen if an unrecognized notification method is 
specified in the "notify" action? Error or ignored?

Alexey: scripts can't have "require" statements for notification 
methods, because a notification method can be specified as a variable, 
who's value can be obtained from an external service.

Do we need to add a test "if a notification method is available"?  One 
use case is when notification method is stored as an IMAP server 
annotation. Agreement to add the test.

<>Once the room has agreed to add the test for available notification 
methods, the room has reached the agreement to make an unrecognised 
notification method an error.

Cyrus (in Jabber) suggested to add ManageSieve protocol capability to 
advertise supported notification methods. The room agrees.

Cyrus suggested Sieve presence extension, so notification types can be 
customized based on presence and time of day. (The latter is already 
possible using Ned's time extension).

6) Add :from to the "notify" action? It is useful for all envisioned 
notification mechanisms, but it might not be generally useful. However a 
notification method is free to ignore the parameter. No objection from 
the room.

7) Ned (in Jabber) is bringing another issue: URI formats need URI 
"percent encoding" for different values, inserting variables into an URI 
will not work. He would like to avoid options, but can't see a way to do 
without them.

8) Do we want to allow suppression of identical notifications?

Greg: the answer might depend on whether we need to provide 
confidentiality. No consensus was reached, so the discussion should 
continue of the mailing list.

Discussion about status of refuse/reject. Most people don't know the 
difference between MDNs, DSNs and protocol-level-refusal. Would script 
writer really care? Consensus from the room that script writers wouldn't 
care, so refuse and reject can be merged into a single action 
("reject"). Confirm the decision on the mailing list.

Cyrus has pointed out that sysadmins care about protocol-level refusals 
versa DSNs, however the draft is already recommending protocol level 
refusals whenever possible.

Cyrus said that non-ascii text in the reject action can't be sent as a 
protocol level refusal. Ned added that if non-ascii text results in 
DSNs, sysadmins will disallow users to use the reject action. The draft 
needs more work in this area.

Alexey and Philip will discuss if it make sense to put the new reject 
back into the base Sieve document.

WG has covered the main agenda items. Barry will publish a new 
individual submission that describes how Sieve can be executed in IMAP 
store on different events, such as flag changes, message deletion, etc. 
He believes that this will require a small extension to Sieve and a 
detailed description on how this would work on IMAP side.

Discussion of the main documents has concluded, so the room has 
discussed other Sieve related issues.

<>Nobody wanted to talk about index or include extensions.
<>
Cyrus will address scoping issue and he hopes that this is going to be 
independent of the variables draft, i.e. it will be an extension to 
variables.

<>Philip has promised a new revision of the base document on November 18th.

Dave Cridland (in jabber) has asked about outcome of the comparator 
discussion. Philip did a quick review of the discussion that happened 
during the IMAPEXT meeting few days earlier. Match type is built on 
comparator's substring matching. <?> matches a single character as 
defined by the comparator (e.g. octet or sequence of UTF-8 octets 
corresponding to a single Unicode character).

Alexey has asked the WG and IMAPEXT chairs if the collation (comparator) 
draft should be done in the Sieve WG, as it is moving much faster than 
IMAPEXT. The answer was no, as most people are participating in both 
working groups. Chairs of both WGs should nag authors of the collation 
draft to move it forward quicker.

<>
<>Variables need to be updated to say that matching with glob characters 
returns pieces of the original string, i.e. before any comparator was 
applied. Alexey wants to send the variables document back to IESG asap.
 
Regards,
Alexey

Date: Tue, 22 Nov 2005 17:43:44 +0000
From: Alexey Melnikov <[email-masked]>
To: Barry Leiba <[email-masked]>
CC: [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

Date: Tue, 22 Nov 2005 12:27:38 -0500
From: Barry Leiba <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

Ned says...
>> So, there are three choices:
>> 1) just compress whitespace at fold points
>> 2) compress all whitespace
>> 3) no compression
> 
> I strongly object to (1) and (2). Making the header test not respect interior
> spaces is a _really_ bad idea. Like it or not, there are communities that are
> very sensitive to spacing issues (many Japanese users seem to qualify) and
> these communites need to be able to test and see exactly what sorts of spaces
> are present in fields (and possibly modify them).

I proposed (1), and am not fond of (2); given Ned's statement and the comments
from Michael and Kjetil, I think it's clear that (2) is out.

> I have no problem with removing whitespace at the beginning of the field - in
> fact I prefer it. I think removing trailing whitespace has a chance of causing
> problems, but the benefits probably equal if not exceed the costs.

I agree.
But the same reasoning is why I suggested (1).  See Michael's comment:

 > Both UCB mail and mutt do compress whitespace at fold points for the
 > overview and show all whitespace at fold points when displaying the
 > message, including the newline.  Both surprises me, and I do not like it.

It's that inconsistency that prompts this suggestion.  Behaviour is so varied
that I'd rather see us define something predictable.

That said, there's Kjetil's comment:

 > so I don't think it matters much in practice.  so my conclusion is:
 > don't confuse matters even more by adding Sieve specific unfolding
 > rules.

There's definitely something to be said for us to just point to the RFC2822
unfolding rule, and not define our own.

I'll be happy with whatever decision we make about the whitespace at the fold
points, but I prefer compressing it to one space there.  I will NOT be happy
if we don't strip leading and trailing whitespace on the overall unfolded
field value.  Moreover, I think another important point in what I suggested
is that this stripping be done ANY TIME Sieve touches a header field value,
NOT JUST IN COMPARISONS.  If we stick the value into a variable and then
compare against the variable, the behaviour must be the same as if we
compare against the header field value directly, which means that the
leading and trailing whitespace must be stripped when the value is put into
the variable in the first place.

Barry

Date: Tue, 22 Nov 2005 12:15:54 -0500
From: Barry Leiba <[email-masked]>
To: [email-masked]
Subject: Re: I-D ACTION:draft-ietf-sieve-3431bis-02.txt
Sender: [email-masked]

Barry

Date: Tue, 22 Nov 2005 12:14:05 -0500
From: Barry Leiba <[email-masked]>
To: Alexey Melnikov <[email-masked]>
CC: MTA filtering mailing list <[email-masked]>
Subject: Re: Missing some information for the Vancouver minutes
Sender: [email-masked]

> 1) Add :from tagged argument to the "notify" action?
> 
> Did anybody objected to this?

I objected to the idea of general parameters, which might not apply to
specific notification mechanisms.  I prefer to have the definitions of
all parameters be in the mechanism documents.

But this is a small objection -- certainly notification text and "from"
are not unreasonable things to have as global things, and a mechanism
that doesn't need the "from" (or the text, for that matter) can ignore it.

> 2) Allow suppression of identical Sieve notifications?
> 
> Did we reach any consensus on this?

I don't recall.  I remember the discussion, but I really don't remember
where it went or what the resolution was.

Barry

Date: Tue, 22 Nov 2005 14:03:13 +0100
From: Michael Haardt <[email-masked]>
To: [email-masked]
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

On Mon, Nov 21, 2005 at 04:40:10PM -0800, Ned Freed wrote:
> > So, there are three choices:
> > 1) just compress whitespace at fold points
> > 2) compress all whitespace
> > 3) no compression
> 
> I strongly object to (1) and (2). Making the header test not respect interior
> spaces is a _really_ bad idea. Like it or not, there are communities that are
> very sensitive to spacing issues (many Japanese users seem to qualify) and
> these communites need to be able to test and see exactly what sorts of spaces
> are present in fields (and possibly modify them).

I think the same logic that led to the consensus of stripping trailing white
space might help:

  How does the MUA present the header?

MUAs do not compress all whitespace.  If Sieve did, comparisons would not
work as the user expects them to.  To me, that's a second reason against
(2).

Both UCB mail and mutt do compress whitespace at fold points for the
overview and show all whitespace at fold points when displaying the
message, including the newline.  Both surprises me, and I do not like it.
So much for logic. ;-)

Not looking at MIME, (1) might remove white spaces that were originally
part of the message, but happened to be at the folding position.
I dislike the thought of not seeing the original content.

As a result, I vote for (3).

Michael

Subject: Re: 'header' test and whitespace
From: Kjetil Torgrim Homme <[email-masked]>
To: Philip Guenther <[email-masked]>
Cc: MTA filtering mailing list <[email-masked]>
Date: Tue, 22 Nov 2005 13:18:45 +0100
Sender: [email-masked]

On Mon, 2005-11-21 at 16:17 -0800, Philip Guenther wrote:
> So, there are three choices:
> 1) just compress whitespace at fold points
> 2) compress all whitespace
> 3) no compression

the unfold logic is too complex for most authors of e-mail software, it
seems, and a "compress whitespace" rule might make life easier for them.
however, they will probably still screw up

Subject: This RFC 2047 thingy is =?UTF-8?Q?p?=
 =?UTF-8?Q?icky?=

so I don't think it matters much in practice.  so my conclusion is:
don't confuse matters even more by adding Sieve specific unfolding
rules.

> Note that we had previously agreed that leading and trailing
> whitespace on the field value in total should be completely ignored;
> that would not be affected by the compression described above.

I don't see why we need to strip trailing whitespace, but I don't feel
strongly about it.
-- 
Kjetil T.

Cc: MTA filtering mailing list <[email-masked]>
To: Philip Guenther <[email-masked]>
Date: Mon, 21 Nov 2005 16:40:10 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: 'header' test and whitespace
Sender: [email-masked]

> First of all, my apologies to the list for failing to get out the
> updated 3028bis I-D by last Friday as I promised.

Haven't gotten the revised vacation draft out either ;-(

> Part of the hold up has been in determining the exact wording to
> insert on a couple points.  In particular, Barry Leiba argued
> strongly in Vancouver that the 'header' test should _at_least_
> normalize to a single space all whitespace that appears at the
> beginning or end of each line of a header field value.  That is,
> the header field unfolding algorithm would not only remove the CRLF
> pair but also compress the whitespace around the CRLF into a single
> space.

> Alternatively, that same compression could be applied to *all* the
> embedded whitespace in the field value, such that the 'header' test
> would never 'see' tabs or consecutive spaces.

> So, there are three choices:
> 1) just compress whitespace at fold points
> 2) compress all whitespace
> 3) no compression

I strongly object to (1) and (2). Making the header test not respect interior
spaces is a _really_ bad idea. Like it or not, there are communities that are
very sensitive to spacing issues (many Japanese users seem to qualify) and
these communites need to be able to test and see exactly what sorts of spaces
are present in fields (and possibly modify them).

Additionally, compression down to a single space is actually insufficient in
some cases - what's needed is for spaces to be removed, not compressed. But
this can, and should, be done through an appropriately defined comparator. It
should not be a built in part of the header test.

> Note that we had previously agreed that leading and trailing
> whitespace on the field value in total should be completely ignored;
> that would not be affected by the compression described above.

I have no problem with removing whitespace at the beginning of the field - in
fact I prefer it. I think removing trailing whitespace has a chance of causing
problems, but the benefits probably equal if not exceed the costs.

				Ned

To: MTA filtering mailing list <[email-masked]>
From: Philip Guenther <[email-masked]>
Subject: 'header' test and whitespace
Date: Mon, 21 Nov 2005 16:17:22 -0800
X-ok-sendmail.com: Yes
Sender: [email-masked]
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:[email-masked]?body=unsubscribe>

First of all, my apologies to the list for failing to get out the
updated 3028bis I-D by last Friday as I promised.

Part of the hold up has been in determining the exact wording to
insert on a couple points.  In particular, Barry Leiba argued
strongly in Vancouver that the 'header' test should _at_least_
normalize to a single space all whitespace that appears at the
beginning or end of each line of a header field value.  That is,
the header field unfolding algorithm would not only remove the CRLF
pair but also compress the whitespace around the CRLF into a single
space.

Alternatively, that same compression could be applied to *all* the
embedded whitespace in the field value, such that the 'header' test
would never 'see' tabs or consecutive spaces.

So, there are three choices:
1) just compress whitespace at fold points
2) compress all whitespace
3) no compression

Note that we had previously agreed that leading and trailing
whitespace on the field value in total should be completely ignored;
that would not be affected by the compression described above.

Philip Guenther

Date: Mon, 21 Nov 2005 15:53:19 -0800
From: Kristin Hubner <[email-masked]>
Subject: Re: Confirming WG consensus: combine reject and refuse into a single action
To: Alexey Melnikov <[email-masked]>
Cc: MTA filtering mailing list <[email-masked]>
Sender: [email-masked]

On Nov 18, 2005, at 7:49 AM, Alexey Melnikov wrote:

>
> Hi folks,
> During the Vancouver IETF people in the room have agreed that Sieve 
> writers don't care about difference between MDNs, DSNs and protocol 
> level refusals. So refuse and reject actions will be combined into a 
> single action, which will generate protocol level refusals, MDNs or 
> DSNs, depending on what is appropriate. If anybody objects to this 
> decision, please speak up now.
>
> Alexey

As long as the "combined" action would have the ability to deal with
the charset issues, I don't object.

That is, I'd like to see not only an ability to specify non-US-ASCII
rejection text, but also a way to choose whether the use of
the non-US-ASCII reject text is mandatory (hence disabling SMTP
level rejection -- user prefers to use their own text rather than
get SMTP level rejection), or optional (used only when an inability
to do an SMTP level rejection for other reasons has already caused
"fall back" to the DSN or MDN approach).  That way, we could
satisfy the users who really, really want their own rejection text
used, and the users who want SMTP level rejection when possible but
when not possible want then to go ahead and use some non-US-ASCII
rejection text.

Regards,

Kristin

To: [email-masked]
Cc: [email-masked]
From: [email-masked]
Subject: I-D ACTION:draft-ietf-sieve-3431bis-02.txt 
Date: Mon, 21 Nov 2005 18:50:01 -0500
Sender: [email-masked]

--NextPart

	

Send a message to:
	[email-masked].
In the body type:

--NextPart
Content-Type: Multipart/Alternative; Boundary="OtherAccess"

--OtherAccess
Content-Type: Message/External-body;
	access-type="mail-server";
	server="[email-masked]"

Content-Type: text/plain
Content-ID:	<[email-masked]>

ENCODING mime
FILE /internet-drafts/draft-ietf-sieve-3431bis-02.txt

--OtherAccess
Content-Type: Message/External-body;
	name="draft-ietf-sieve-3431bis-02.txt";
	site="ftp.ietf.org";
	access-type="anon-ftp";
	directory="internet-drafts"

Content-Type: text/plain
Content-ID:	<[email-masked]>

--OtherAccess--

--NextPart--

Date: Fri, 18 Nov 2005 15:49:42 +0000
From: Alexey Melnikov <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Confirming WG consensus: combine reject and refuse into a single action
Sender: [email-masked]

Hi folks,
During the Vancouver IETF people in the room have agreed that Sieve 
writers don't care about difference between MDNs, DSNs and protocol 
level refusals. So refuse and reject actions will be combined into a 
single action, which will generate protocol level refusals, MDNs or 
DSNs, depending on what is appropriate. If anybody objects to this 
decision, please speak up now.

Alexey

Date: Fri, 18 Nov 2005 16:01:49 +0000
From: Alexey Melnikov <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Missing some information for the Vancouver minutes
Sender: [email-masked]

I've started converting Tony's jabber log into minutes and discovered 
that there is no record of some minor decisions.
In particular:

1) Add :from tagged argument to the "notify" action?

Did anybody objected to this?

2) Allow suppression of identical Sieve notifications?

Did we reach any consensus on this?

Thanks,
Alexey

Date: Sat, 12 Nov 2005 21:15:52 +0000
From: Alexey Melnikov <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Resolution for IESG discuss on variable - :lower/:upper underspecified
Sender: [email-masked]

During the meeting in Vancouver the WG was offered two choices on how to 
fully describe ":lower"/":upper":
1). clarify that :lower/:upper only affect US-ASCII subset of Unicode 
characters.
2). design a solution that would deal properly with all Unicode characters.

The show of hands at the meeting suggested that people support # 1 and 
nobody supported # 2. This message is to confirm this decision on the 
mailing list.

Unless somebody can come up with a technical reason why we should do # 2 
now, I would request Kjetil to update the document to implement # 1. As 
soon as this is done the document can be sent back to IESG.

Alexey

P.S. Note that 2) can always be done as an extension at a later time.

From: "Mark E. Mallett" <[email-masked]>
Date: Fri, 11 Nov 2005 16:38:07 -0500
To: Nigel Swinson <[email-masked]>
Cc: Tony Hansen <[email-masked]>, [email-masked]
Subject: Re: I-D ACTION:draft-hansen-sieve-loop-01.txt]
Sender: [email-masked]

Hi-

The first thing I'd bark at here (arf) is the periods in the command
"for.every.part" .  Not only would this cause me some minor pain in
parsing (my problem, I know), but I'm pretty sure that RFC3028 wants
commands/identifiers to contain only alphas, digits, and underscores.

On Thu, Nov 03, 2005 at 02:55:40PM -0000, Nigel Swinson wrote:

> 2 Sieve Loops
> 
> I can see that this makes perfect sense when used with replace and am glad 
> to see you've included "break" which I completely missed on my first scan. 

"break" is good.  I wonder if a "next" or "continue" would be useful as
well.  For that matter, it might be better to have a separate extension
describing some elements of looping constructs within SIEVE (without
actually defining any looping commands) that defines "break" and such.

> 3 Test "mime"
> 
> I like this test, but my earlier comments from 2004 still stand 
> (http://www.imc.org/ietf-mta-filters/mail-archive/msg01723.html).

Plus related comments at or around
   http://www.imc.org/ietf-mta-filters/mail-archive/msg01660.html

> You say:
> 
>   If used within the context of a "for.every.part" iterator, the "mime"
>   test will examine the headers associated with the current MIME part
>   context.
> 
>   If used outside the context of a "for.every.part" iterator, the
>   "mime" test will examine all MIME body parts and return true if any
>   of them satisfies the test.
> 
> While I'm glad you've provided the facility to easily look for attachments 
> of the given type without using for.every.part, this wasn't the behaviour I 
> was expecting and I think it's too quirky.  What if i find an attachment of 
> type rfc822 (think of multipart/digest), and then I'd want to recursively 
> look through all the attachments of just that attached message?  I would 
> much rather the mime test just look at the current body part context, and 
> we provide a switch which asks for the test to apply to all the child body 
> parts too where relevant.  This switch then also makes sense when used with 
> other tests like header, exists, size, address.  Something like:
> 
>    mime :recursive :type :is "image"
> 
> Or:
> 
>    mime :anybodypart :type :is "image"

I agree.  The "for*" should set the focus, and the "mime" and other
tests should work within that focus.  Outside of the "for" the focus
would be on the root part.  Making "mime" work differently in different
contexts would be inconsistent and difficult to understand (and
complicate the implementations -- the mime verb would have to know what
scope it is in, and how far outwards that scope extends).  One thing
I would like to see (as I mentioned in the thread I referenced above) is
that the recursion parameter specify that it operate *only* on the
children (i.e., not include the part that's being focused on).  This
would let the script writer test either the part in focus, or its
children, or both; the other way is less flexible.  (Personally I don't
think "both" would generally be wanted.).  So maybe ":anychild" instead
of ":recursive".

> 4 Action Replace
> 
>   When used in the context of a "for.every.part" loop, the MIME part to
>   be replaced is the "current" MIME part.  If the current MIME context
>   is a multipart MIME part, the entire multipart MIME part is replaced.
>   (Replacing a non-multipart MIME part within a "for.every.part" loop
>   context does not alter the overall message structure.)
> 
> I think I know what you are trying to get at with the bit in (), but I 
> don't actually understand what you have said.  I suggest just dropping the 
> () bit, as I don't think it's necessary.

I think he's trying to make it clear that replacing a multipart MIME
part does alter the message structure, as it wipes out one or more children
of the part being replaced.  Maybe it would be clearer by adding a sentence
before the () rather than dropping the parenthesised stuff, e.g.,
", which would alter the MIME structure of the message by eliminating all
of the children of the multipart part."

Oh and (from the draft):

   > A new sieve action command is defined to allow the MIME part to be
   > replaced by a text message.  The "replace" command causes a MIME part
   > to be removed and replaced with a text/plain part with the text
   > supplied by the command.

This could be made consistent with "vacation" by allowing ":mime" --
letting the script writer supply the entire message part as the new
replacment string (with appropriate proscriptions against things that
couldn't be used here).

> 5 Action Enclose

I find this whole section troubling :-)

I'd rather it didn't mandate a delayed execution of this action; and if
it really wants to talk about how to handle multiple "enclose" verbs I
think it would be more consistent with other Sieve actions to simply
say that duplicate actions are either an error or should be ignored.

>  This action does not affect messages that are
>   forwarded via a "redirect" action.
> 
> I don't like the last sentence very much at all.  It implies I need to 
> forward before I modify, which means I'll likely end up with two copies of 
> the message which sounds like an awkward issue to deal with and I'm not 
> sure it's the right behaviour anyway.  If I read a script that had a 
> replace/enclose as well as a redirect, then I'd expect that the redirected 
> message to have the replace/enclose action included.  Is it not most likely 
> we'd be using enclose/replace for security/moderation reasons, so why 
> wouldn't we want this to apply for redirected mail?

Yeah, I agree- I don't like having that amount of magic.  

Also, harping on this old views thing again..  when you are altering a
message, particularly when you get into changing/adding MIME parts,
often you want this to be only for some particular context, and it would
be nice to be able to back out some changes or revert to another view
before proceding.  e.g.:

   view_closure {
       enclose "some intro comment";
       redirect "[email-masked]";
   }

But that's still way off track.

>   Specifically, the original message becomes a multipart/mixed message
>   with two parts: a text/plain portion with the string argument as its
>   body, and a message/rfc822 portion with the original message
>   enclosed.  The Content-Type: header field becomes multipart/mixed.
>   The Subject: header is specified by the :subject argument.  Any
>   headers specified by :headers are copied from the old message into
>   the new message.
> 
> Might I suggest that we copy all the headers by default, including the 
> subject?  If we don't are we not then at risk of creating mail loops etc 
> and also breaking the threading of messages due to the altered subject 
> line/references/message-id?  That means we don't need the :headers/:subject 
> arguments at all :o)

Although perhaps here too a ":mime" option would be valuable.

Some random thoughts:

What will this do:

    for.every.part {
        if (some test here) {
	    for.every.part {
	        ...
            }
        }
    }

i.e. will the internal "for" be anchored at the focus established
by the enclosing "for" ?  I'd hope so, but this should be stated.

Also in the vein of using "replace" to weed out unwanted parts:
I wonder if the inverse would be sometimes desirable, i.e.,
replace all but the selected part.  e.g.:

    if allof (header :contains "content-type" "multipart/alternative" {
        for.every.part {
	    if header :contains "content-type" "text/plain" {
		replace :allbut "alternative part deleted.";
		break;
	    }
 	}
    }

BTW, shouldn't there be a "mime" shorthand for testing the type/subtype,
without requiring
     if allof (mime :type "multipart", mime :subtype "alternative")
?  Especially for any recursive version of "mime" (since the elements
inside of "allof" can be matching different mime parts).

mm

From: "Nigel Swinson" <[email-masked]>
To: "Tony Hansen" <[email-masked]>
Cc: <[email-masked]>, "Cyrus Daboo" <[email-masked]>
Subject: Re: I-D ACTION:draft-hansen-sieve-loop-01.txt]
Date: Thu, 10 Nov 2005 12:24:55 -0000
Sender: [email-masked]

> > Might I suggest that we copy all the headers by default, including the
> > subject?  If we don't are we not then at risk of creating mail loops etc
> > and also breaking the threading of messages due to the altered subject
> > line/references/message-id?  That means we don't need the
> > :headers/:subject arguments at all :o)
> 
> I started with the "copy everything" by default. But then I started
> thinking about headers such as the various domainkeys, iim and dkim
> headers, trace headers, etc. This is really a new message that's being
> created, so should reflect that. 

I think logically it's an altered version of the original message, which for delivery/loop/thread issues should be considered the same.  It's almost the same as adding some kind of X-Spam-Score header.  I would consider something like vacation to generate "new" messages, but don't believe that to be the case here.

> Besides, everything else is being
> carried along in the message/rfc822 portion.

Except loop/trace analysis isn't going to go hoking about in the attached body parts to look for these.  So it'll be fine for humans to read, but the software is going to trip up and many of the headers are designed for them to read.

I feel pretty strongly about this, but at the same time don't think I'd implement enclose, so if nobody else thinks this is a problem, then I'll just keep out your way.

Nigel

Date: Wed, 09 Nov 2005 17:51:24 -0500
From: Tony Hansen <[email-masked]>
To: Nigel Swinson <[email-masked]>
CC: [email-masked], Cyrus Daboo <[email-masked]>
Subject: Re: I-D ACTION:draft-hansen-sieve-loop-01.txt]
Sender: [email-masked]

Nigel Swinson wrote:
> 
> I'm glad to see you've merged the loop/mime I-drafts (as I'd
> recommended) :o) A little surprised that you've stuck with the
> "sieve-loop" rather than the "sieve-mime" as it seems like it's
> extensions targetted at mime more than it is to looping.  

It was more an artifact of timing. It didn't get done until after the
-00 cutoff, and the path of least resistance was to keep the name.

> Along these
> lines I'd suggest:
> 
> - Sieve Extensions: MIME Bodypart Iteration, MIME Tests, Replacement and
> -                               Enclosure
> 
> + Sieve Extensions: MIME Tests, MIME Bodypart Iteration, Replacement and
> +                               Enclosure

a reasonable suggestion

> 2 Sieve Loops
> 
> I can see that this makes perfect sense when used with replace and am
> glad to see you've included "break" which I completely missed on my
> first scan. Is it worth being a little more explicit when describing the
> behaviour of other tests like header/address/size within a
> for.every.part test?  This could probably done purely by extended example.

ok

> 3 Test "mime"
> 
> I like this test, but my earlier comments from 2004 still stand
> (http://www.imc.org/ietf-mta-filters/mail-archive/msg01723.html).  I
> think a header part sepecifier like this would still be of value:
> 
>   Syntax:   header [HEADER-PART] [COMPARATOR] [MATCH-TYPE]
>             <header-names: string-list> <key-list: string-list>
> 
>    HEADER-PART: ":value" / ":parameter" <param-names: string-list>
> 
> However having a mime test specifically targetted at looking at mime
> headers won't prevent a HEADER-PART, so I guess I can't have a strong
> objection.
> 
> You say:
> 
>   If used within the context of a "for.every.part" iterator, the "mime"
>   test will examine the headers associated with the current MIME part
>   context.
> 
>   If used outside the context of a "for.every.part" iterator, the
>   "mime" test will examine all MIME body parts and return true if any
>   of them satisfies the test.
> 
> While I'm glad you've provided the facility to easily look for
> attachments of the given type without using for.every.part, this wasn't
> the behaviour I was expecting and I think it's too quirky.  What if i
> find an attachment of type rfc822 (think of multipart/digest), and then
> I'd want to recursively look through all the attachments of just that
> attached message?  I would much rather the mime test just look at the
> current body part context, and we provide a switch which asks for the
> test to apply to all the child body parts too where relevant.  This
> switch then also makes sense when used with other tests like header,
> exists, size, address.  Something like:
> 
>    mime :recursive :type :is "image"
> 
> Or:
> 
>    mime :anybodypart :type :is "image"
>    header :anybodypart :contains "Subject" "important"

Interesting suggestion. We'll think about it.

> 4 Action Replace
> 
>   When used in the context of a "for.every.part" loop, the MIME part to
>   be replaced is the "current" MIME part.  If the current MIME context
>   is a multipart MIME part, the entire multipart MIME part is replaced.
>   (Replacing a non-multipart MIME part within a "for.every.part" loop
>   context does not alter the overall message structure.)
> 
> I think I know what you are trying to get at with the bit in (), but I
> don't actually understand what you have said.  I suggest just dropping
> the () bit, as I don't think it's necessary.

I agree that it's not necessary, but I think it's still worth noting.
We'll look at the wording to make it clearer.

> I think we should say "The replace action happens immediately, and
> therefore when used inside a for.every.part loop will affect the
> iteration of that loop and all subsequent tests in this script".  Much
> in the same way as is done in the edit header extension.
> 
> 5 Action Enclose
> 
> Need an example of the :headers argument in use.
> 
>   This enclose action
>   takes precedance over all other message modifications, such as
>   "replace".  If multiple "enclose" actions are executed by a script,
>   only the text specified on the last one is used when creating the
>   enclosed message.
> 
> I find the above quite confusing.  Perhaps you could say something like
> "The enclose action MUST NOT happen immediately, but rather be delayed
> until we have finished processing the script".  If we then have replace
> happen immediately, there's no clash between enclose/replace as one
> happens immediately, and the other at the end of the script.
> 
> However enclose currently doesn't seem to allow us to enclose attached
> messages, it just wraps the entire message.  Do we want it to support
> enclosing attached rfc822 content?  Again I'm thinking of
> multipart/digest or just forwarded rfc822 content.
> 
>  This action does not affect messages that are
>   forwarded via a "redirect" action.
> 
> I don't like the last sentence very much at all.  It implies I need to
> forward before I modify, which means I'll likely end up with two copies
> of the message which sounds like an awkward issue to deal with and I'm
> not sure it's the right behaviour anyway.  If I read a script that had a
> replace/enclose as well as a redirect, then I'd expect that the
> redirected message to have the replace/enclose action included.  Is it
> not most likely we'd be using enclose/replace for security/moderation
> reasons, so why wouldn't we want this to apply for redirected mail?
> 
>   Specifically, the original message becomes a multipart/mixed message
>   with two parts: a text/plain portion with the string argument as its
>   body, and a message/rfc822 portion with the original message
>   enclosed.  The Content-Type: header field becomes multipart/mixed.
>   The Subject: header is specified by the :subject argument.  Any
>   headers specified by :headers are copied from the old message into
>   the new message.
> 
> Might I suggest that we copy all the headers by default, including the
> subject?  If we don't are we not then at risk of creating mail loops etc
> and also breaking the threading of messages due to the altered subject
> line/references/message-id?  That means we don't need the
> :headers/:subject arguments at all :o)

I started with the "copy everything" by default. But then I started
thinking about headers such as the various domainkeys, iim and dkim
headers, trace headers, etc. This is really a new message that's being
created, so should reflect that. Besides, everything else is being
carried along in the message/rfc822 portion.

Thanks for all the suggestions!

	Tony Hansen
	[email-masked]

Date: Wed, 09 Nov 2005 17:18:35 +0000
From: Alexey Melnikov <[email-masked]>
To: MTA filtering mailing list <[email-masked]>
Subject: Re: Material for the Sieve meeting in Vancouver
Sender: [email-masked]

Alexey Melnikov wrote:

> Hi everybody,
> I would like to request all editors to prepare and send me slides 
> and/or short report on issues for each document they are editing.

I've uploaded the chair's presentation for the Vancouver Sieve WG 
meeting to:
https://onsite.ietf.org/public/meeting_materials.cgi?meeting_num=64

Any other presentations?

Alexey

Date: Tue, 08 Nov 2005 17:50:56 +0000
From: Alexey Melnikov <[email-masked]>
To: Tony Hansen <[email-masked]>
CC: MTA filtering mailing list <[email-masked]>
Subject: Re: Proposed agenda for the SIEVE WG meeting in Vancouver
Sender: [email-masked]

Tony Hansen wrote:

>loops/mime test?
Yes, I've added this to my list already.

From: "Scott Hollenbeck" <[email-masked]>
To: [email-masked]
Subject: Last Call Ended: draft-ietf-sieve-vacation-04.txt
Date: Sun, 6 Nov 2005 15:55:06 -0500
Sender: [email-masked]

The IETF last call for draft-ietf-sieve-vacation-04.txt has concluded.
Please update the document to address last call comments discussed on this
mailing list (I didn't see any sent privately to the IESG).  I'll bring the
document to the IESG for evaluation after the update is available and the WG
confirms that everything has been addressed.

-Scott-

Cc: Scott Hollenbeck <[email-masked]>, [email-masked]
To: Kjetil Torgrim Homme <[email-masked]>
Date: Sat, 05 Nov 2005 10:11:54 -0800 (PST)
From: Ned Freed <[email-masked]>
Subject: Re: FW: "Unicode" vs "ISO 10646"
Sender: [email-masked]

> On Thu, 2005-10-27 at 13:01 -0400, Scott Hollenbeck wrote:
> > Here's something to think about that came up during today's IESG evaluation
> > of draft-ietf-sieve-variables.  It might be worth talking about since the
> > doc needs some other edits before IESG approval.

> > >>From: Brian E Carpenter [mailto:[email-masked]]
> > >>
> > >>While scanning drafts in Frankfurt airport, I noticed
> > >>that two of them (the iris and sieve drafts) refer in the
> > >>text to Unicode.
> > >>
> > >>My understanding is that the IETF recommendation is to
> > >>use the ISO 10646 coded character set, and I thought there
> > >>were good reasons we specified that instead of Unicode.
> > >>
> > >>What should we be looking for in RFCs?
> >>
> >> Where is that recommendation?
> >
> > RFC 2277 = BCP 18
> >
> > which doesn't even mention Unicode. (Also see RFC 2130).

> on the other hand, stringprep (RFC 3454) is quite explicit in that it is
> based on Unicode 3.2, rather than "ISO 10646 with amendments".

I haven't checked this, but it might be due to ISO 10646 not containing the
necessary information about normalization procedures.

> I
> believe this is a more stringent choice, although I'm unsure if an
> explicit reference to Unicode 3.2 is the right choice for miscellaneous
> other documents.

It is definitely a more stringent choice. Historically ISO 10646 has tracked
changes in Unicode, so saying "ISO 10646 with amendments" has historically
corresponded to "a recent version of Unicode". A reference to Unicode 3.2,
OTOH, means that version and that version only.

> I believe it would be very useful to define a stringprep profile for
> Sieve.  the profile may be defined for more general usage (comparators
> too, others?), but something [SIEVE] can refer to would make things a
> whole lot clearer.  I don't suggest to make it mandatory for Sieve, but
> *either* you support US-ASCII only (and use the identity mapping for
> other code points) *or* you support the profile.

I really don't see the value in this. You said later that it would be used for
matching and for :upper and :lower. I think sieve is a case where using
a nameprep profile by default in matching could easily cause more problems
than it solves. I suppose there's some value in making :upper and :lower
more versatile, but I don't think having a single, global default profile
for this is the right way to do it.

				Ned

Subject: Re: FW: "Unicode" vs "ISO 10646"
From: Kjetil Torgrim Homme <[email-masked]>
To: Philip Guenther <[email-masked]>
Cc: [email-masked]
Date: Fri, 04 Nov 2005 03:10:59 +0100
Sender: [email-masked]

On Thu, 2005-11-03 at 09:26 -0800, Philip Guenther wrote:
> Kjetil Torgrim Homme <[email-masked]> writes:
> ...
> >I believe it would be very useful to define a stringprep profile for
> >Sieve.  the profile may be defined for more general usage (comparators
> >too, others?), but something [SIEVE] can refer to would make things a
> >whole lot clearer.  I don't suggest to make it mandatory for Sieve, but
> >*either* you support US-ASCII only (and use the identity mapping for
> >other code points) *or* you support the profile.
> 
> Could you be more specific about what this profile would be used for in
> [SIEVE]?  If it's 'just' a comparator, then it belongs in the collation
> doc, but that already defines defines a *nameprep* based collation
> (i;nameprep;v=1;uv=3.2) as well as collations using the Unicode
> Collation Algorithm, so I suspect you have more in mind that just using
> it as a comparator.

well, by using a nameprep profile, quite a few normal characters are
prohibited, in particular U+00A0 (&nbsp;) is way too common in e-mail to
be disallowed, IMHO.  but I'm not quite clear what prohibiting a
character really means for Sieve.

I just want something which makes sense for matching in base Sieve, but
I also want a :lower and :upper which works in "variables".  using the
nameprep profile is certainly better than locking it to US-ASCII,
though.
-- 
Kjetil T.

To: Kjetil Torgrim Homme <[email-masked]>
Cc: [email-masked]
From: Philip Guenther <[email-masked]>
Subject: Re: FW: "Unicode" vs "ISO 10646" 
Date: Thu, 03 Nov 2005 09:26:33 -0800
Sender: [email-masked]

Kjetil Torgrim Homme <[email-masked]> writes:
...
>I believe it would be very useful to define a stringprep profile for
>Sieve.  the profile may be defined for more general usage (comparators
>too, others?), but something [SIEVE] can refer to would make things a
>whole lot clearer.  I don't suggest to make it mandatory for Sieve, but
>*either* you support US-ASCII only (and use the identity mapping for
>other code points) *or* you support the profile.

Could you be more specific about what this profile would be used for in
[SIEVE]?  If it's 'just' a comparator, then it belongs in the collation
doc, but that already defines defines a *nameprep* based collation
(i;nameprep;v=1;uv=3.2) as well as collations using the Unicode
Collation Algorithm, so I suspect you have more in mind that just using
it as a comparator.

Philip Guenther

From: "Nigel Swinson" <[email-masked]>
To: "Tony Hansen" <[email-masked]>
Cc: <[email-masked]>
Subject: Re: I-D ACTION:draft-hansen-sieve-loop-01.txt]
Date: Thu, 3 Nov 2005 14:55:40 -0000
Sender: [email-masked]

I'm glad to see you've merged the loop/mime I-drafts (as I'd recommended) 
:o) A little surprised that you've stuck with the "sieve-loop" rather than 
the "sieve-mime" as it seems like it's extensions targetted at mime more 
than it is to looping.  Along these lines I'd suggest:

- Sieve Extensions: MIME Bodypart Iteration, MIME Tests, Replacement and
-                               Enclosure

+ Sieve Extensions: MIME Tests, MIME Bodypart Iteration, Replacement and
+                               Enclosure

2 Sieve Loops

I can see that this makes perfect sense when used with replace and am glad 
to see you've included "break" which I completely missed on my first scan. 
Is it worth being a little more explicit when describing the behaviour of 
other tests like header/address/size within a for.every.part test?  This 
could probably done purely by extended example.

3 Test "mime"

I like this test, but my earlier comments from 2004 still stand 
(http://www.imc.org/ietf-mta-filters/mail-archive/msg01723.html).  I think a 
header part sepecifier like this would still be of value:

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

    HEADER-PART: ":value" / ":parameter" <param-names: string-list>

However having a mime test specifically targetted at looking at mime headers 
won't prevent a HEADER-PART, so I guess I can't have a strong objection.

You say:

   If used within the context of a "for.every.part" iterator, the "mime"
   test will examine the headers associated with the current MIME part
   context.

   If used outside the context of a "for.every.part" iterator, the
   "mime" test will examine all MIME body parts and return true if any
   of them satisfies the test.

While I'm glad you've provided the facility to easily look for attachments 
of the given type without using for.every.part, this wasn't the behaviour I 
was expecting and I think it's too quirky.  What if i find an attachment of 
type rfc822 (think of multipart/digest), and then I'd want to recursively 
look through all the attachments of just that attached message?  I would 
much rather the mime test just look at the current body part context, and we 
provide a switch which asks for the test to apply to all the child body 
parts too where relevant.  This switch then also makes sense when used with 
other tests like header, exists, size, address.  Something like:

    mime :recursive :type :is "image"

Or:

    mime :anybodypart :type :is "image"
    header :anybodypart :contains "Subject" "important"

4 Action Replace

   When used in the context of a "for.every.part" loop, the MIME part to
   be replaced is the "current" MIME part.  If the current MIME context
   is a multipart MIME part, the entire multipart MIME part is replaced.
   (Replacing a non-multipart MIME part within a "for.every.part" loop
   context does not alter the overall message structure.)

I think I know what you are trying to get at with the bit in (), but I don't 
actually understand what you have said.  I suggest just dropping the () bit, 
as I don't think it's necessary.

I think we should say "The replace action happens immediately, and therefore 
when used inside a for.every.part loop will affect the iteration of that 
loop and all subsequent tests in this script".  Much in the same way as is 
done in the edit header extension.

5 Action Enclose

Need an example of the :headers argument in use.

   This enclose action
   takes precedance over all other message modifications, such as
   "replace".  If multiple "enclose" actions are executed by a script,
   only the text specified on the last one is used when creating the
   enclosed message.

I find the above quite confusing.  Perhaps you could say something like "The 
enclose action MUST NOT happen immediately, but rather be delayed until we 
have finished processing the script".  If we then have replace happen 
immediately, there's no clash between enclose/replace as one happens 
immediately, and the other at the end of the script.

However enclose currently doesn't seem to allow us to enclose attached 
messages, it just wraps the entire message.  Do we want it to support 
enclosing attached rfc822 content?  Again I'm thinking of multipart/digest 
or just forwarded rfc822 content.

  This action does not affect messages that are
   forwarded via a "redirect" action.

I don't like the last sentence very much at all.  It implies I need to 
forward before I modify, which means I'll likely end up with two copies of 
the message which sounds like an awkward issue to deal with and I'm not sure 
it's the right behaviour anyway.  If I read a script that had a 
replace/enclose as well as a redirect, then I'd expect that the redirected 
message to have the replace/enclose action included.  Is it not most likely 
we'd be using enclose/replace for security/moderation reasons, so why 
wouldn't we want this to apply for redirected mail?

   Specifically, the original message becomes a multipart/mixed message
   with two parts: a text/plain portion with the string argument as its
   body, and a message/rfc822 portion with the original message
   enclosed.  The Content-Type: header field becomes multipart/mixed.
   The Subject: header is specified by the :subject argument.  Any
   headers specified by :headers are copied from the old message into
   the new message.

Might I suggest that we copy all the headers by default, including the 
subject?  If we don't are we not then at risk of creating mail loops etc and 
also breaking the threading of messages due to the altered subject 
line/references/message-id?  That means we don't need the :headers/:subject 
arguments at all :o)

Nigel 

Subject: Re: Material for the Sieve meeting in Vancouver
From: Kjetil Torgrim Homme <[email-masked]>
To: [email-masked]
Date: Wed, 02 Nov 2005 22:43:01 +0100
Sender: [email-masked]

On Wed, 2005-11-02 at 21:57 +0100, Kjetil Torgrim Homme wrote:
> just wondering, it is 3 minutes until the meeting according to my watch,
> but the Jabber room is empty.  am I on the right server?
> [email-masked] (also known as [email-masked])

what do you mean, I should check the day of the month as well?  :-)
-- 
Kjetil T.

Subject: Re: Material for the Sieve meeting in Vancouver
From: Kjetil Torgrim Homme <[email-masked]>
To: [email-masked]
Date: Wed, 02 Nov 2005 21:57:33 +0100
Sender: [email-masked]

On Mon, 2005-10-31 at 16:43 +0000, Alexey Melnikov wrote:
> I would also like to know who is going to attend the meeting and who can 
> participate in jabber.

just wondering, it is 3 minutes until the meeting according to my watch,
but the Jabber room is empty.  am I on the right server?
[email-masked] (also known as [email-masked])
-- 
Kjetil T.