Message Organization Working Group D. Karp Internet-Draft Zimbra Updates: 5256 (if approved) January 30, 2009 Intended status: Standards Track Expires: August 3, 2009 Display-based Address Sorting for the IMAP4 SORT Extension draft-ietf-morg-sortdisplay-00 Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on August 3, 2009. Copyright Notice Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Abstract This document describes an IMAP protocol extension enabling server- Karp Expires August 3, 2009 [Page 1] Internet-Draft IMAP4 Display-based Address Sorting January 2009 side message sorting based on the commonly-displayed portion of the From header. Table of Contents 1. Conventions Used in This Document . . . . . . . . . . . . . . . 3 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. The DISPLAYFROM Sort Key . . . . . . . . . . . . . . . . . . . 3 4. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . . 4 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 4 6. Internationalization Considerations . . . . . . . . . . . . . . 4 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4 8. Normative References . . . . . . . . . . . . . . . . . . . . . 4 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 5 Karp Expires August 3, 2009 [Page 2] Internet-Draft IMAP4 Display-based Address Sorting January 2009 1. Conventions Used in This Document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 2. Introduction The [SORT] extension to the [IMAP] protocol provides a means for server-based sorting of messages. It defines a set of sort criteria and the mechanism for determining the sort value of a message for each such ordering. The [SORT] extension's FROM ordering sorts messages lexically on the [IMAP] addr-part of the first address in the From header. This document provides an alternate ordering, DISPLAYFROM, which sorts messages lexically based on the From address's [RFC2822] display- name, when present. A server that supports the DISPLAYFROM sort criterion indicates this by returning "SORT=DISPLAYFROM" in its CAPABILITY response. 3. The DISPLAYFROM Sort Key This document introduces a new [SORT] sort-key, DISPLAYFROM. A message's sort value under the DISPLAYFROM ordering MUST be derived from the first [RFC2822] mailbox in its From header as follows: o If the From header is absent or if the header contains no mailboxes, the message's sort value is the empty string. o If the mailbox contains an [RFC2822] display-name, replace each instance of [RFC2822] CFWS in the display-name with a single space, trim all leading and trailing whitespace, and decode any [RFC2047] encoded-words. If the resulting string is not the empty string, use it as the sort value for the message. o Otherwise, completely remove all [RFC2822] CFWS from the mailbox's [RFC2822] addr-spec and use the resulting string as the message's sort value. Karp Expires August 3, 2009 [Page 3] Internet-Draft IMAP4 Display-based Address Sorting January 2009 4. Formal Syntax The following syntax specification uses the Augmented Backus-Naur Form (ABNF) notation as specified in [RFC4234]. [IMAP] defines the non-terminal "capability" and [SORT] defines "sort-key". capability =/ "SORT=DISPLAYFROM" sort-key =/ "DISPLAYFROM" 5. Security Considerations This document defines an additional IMAP4 capability. As such, it does not change the underlying security considerations of [IMAP]. The author believes that no new security issues are introduced with this additional IMAP4 capability. 6. Internationalization Considerations DISPLAYFROM is a string-based sort criterion. As stated in [SORT], the collations mandated by I18NLEVEL=1 or I18NLEVEL=2 from [RFC5255] MUST be followed when sorting such strings. The DISPLAYFROM ordering sorts on the full decoded [RFC2822] display- name, when present. It does not attempt to parse this string in a locale- or language-dependent manner in order to determine and sort on some semantically meaningful substring such as the surname. 7. IANA Considerations [IMAP] capabilities are registered by publishing a standards track or IESG-approved experimental RFC. This document constitutes registration of the SORT=DISPLAYFROM capability in the [IMAP] capabilities registry. 8. Normative References [IMAP] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, March 2003. [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text", RFC 2047, November 1996. Karp Expires August 3, 2009 [Page 4] Internet-Draft IMAP4 Display-based Address Sorting January 2009 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001. [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 4234, October 2005. [RFC5255] Newman, C., Gulbrandsen, A., and A. Melnikov, "Internet Message Access Protocol Internationalization", RFC 5255, June 2008. [SORT] Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and THREAD Extensions", RFC 5256, June 2008. Author's Address Dan Karp Zimbra, a Yahoo! Company 701 First St. Sunnyvale, CA 94089 USA Email: dkarp@zimbra.com URI: http://www.zimbra.com Karp Expires August 3, 2009 [Page 5]