Subject: [MORG] I-D Action:draft-ietf-morg-sortdisplay-01.txt

From: [email-masked]
Date: Tue, 29 Sep 2009 15:30:01 -0700 (PDT)

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the Message Organization Working Group of the IETF.

	Title           : Display-based Address Sorting for the IMAP4 SORT Extension
	Author(s)       : D. Karp
	Filename        : draft-ietf-morg-sortdisplay-01.txt
	Pages           : 6
	Date            : 2009-09-29

This document describes an IMAP protocol extension enabling server-
side message sorting based on the commonly-displayed portion of the
>From and To header fields.

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-morg-sortdisplay-01.txt

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

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

---

From: Dan Karp <[email-masked]>
Date: Wed, 30 Sep 2009 09:50:51 -0700 (PDT)

> http://www.ietf.org/internet-drafts/draft-ietf-morg-sortdisplay-01.txt

In response to MORG requests, I've revised the draft to include DISPLAYTO
as well as DISPLAYFROM and changed the CAPABILITY string to "SORT=DISPLAY".
If you have a moment, please take a look at this revision of the draft
and let me know how it sits.  (Especially welcome would be a sanity-check
of the logic for determining the DISPLAY sort value of an RFC 5322 mailbox.)

Thanks much.

---

From: Timo Sirainen <[email-masked]>
Date: Wed, 30 Sep 2009 13:35:17 -0400

> o  If the mailbox contains an [RFC5322] display-name, replace each
>       instance of [RFC5322] CFWS in the display-name with a single
>       space, trim leading and trailing whitespace, and decode any
>       quoted-strings and [RFC2047] encoded-words.  If the resulting
>       string is not the empty string, use it as the sort value for the
>       mailbox.

Is the ordering right? Maybe it should be more like:

1. Decode RFC 2047 encoded-words
2. Decode quoted-strings
3. Trim away extra whitespace

Or is the whitespace significant in encoded-words and quoted-strings?

> o  Otherwise, the message's sort value is the DISPLAY sort value of
>       the first mailbox in its From header.

Minor thing: Everywhere else it says "[RFC5322] mailbox", except here.

---

From: Dan Karp <[email-masked]>
Date: Wed, 30 Sep 2009 12:45:31 -0700 (PDT)

> >       string is not the empty string, use it as the sort value for
> >       the mailbox.
> 

Well, you have to strip comments (the 'C' part of "CFWS") before handling
encoded-words and quoted-strings.  Whether to also normalize whitespace
after doing the encoded-word and quoted-string decoding is a separate
question.  Both encoded-words and quoted-strings do indeed consider
whitespace to be significant, but we have the right to override that when
calculating the sort value if we so desire.

> Minor thing: Everywhere else it says "[RFC5322] mailbox", except here.

Well, here and the previous paragraph that you quoted.  I tried to 
mention the RFC when referencing part of its ABNF just once per section/
subsection/list.  But I have no problem in using the footnote in each
case...

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Wed, 30 Sep 2009 21:50:29 +0200

> 3. Trim away extra whitespace

I don't think it really matters. In real life you want to do a little of 
both, if you care about catering to the varieties of broken 2047 
encoding that float around the net. I'd prefer wording that handwaves 
around all that.

FWIW, I also trim away some other things, which I wouldn't like to add 
to the document, e.g. outlookisms and phish vomit:

     To: "[email-masked]'" <[email-masked]>
     From: "[email-masked]" <[email-masked]>

Arnt