draft-ietf-imapext-sort-12.txt   draft-ietf-imapext-sort-13.txt 
IMAP Extensions Working Group M. Crispin IMAP Extensions Working Group M. Crispin
INTERNET-DRAFT: IMAP SORT K. Murchison INTERNET-DRAFT: IMAP SORT K. Murchison
Document: internet-drafts/draft-ietf-imapext-sort-12.txt March 2003 Document: internet-drafts/draft-ietf-imapext-sort-13.txt May 2003
INTERNET MESSAGE ACCESS PROTOCOL - SORT AND THREAD EXTENSION INTERNET MESSAGE ACCESS PROTOCOL - SORT AND THREAD EXTENSIONS
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC 2026. all provisions of Section 10 of RFC 2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as other groups may also distribute working documents as
Internet-Drafts. Internet-Drafts.
skipping to change at page 1, line 36 skipping to change at page 1, line 36
To view the list Internet-Draft Shadow Directories, see To view the list Internet-Draft Shadow Directories, see
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
A revised version of this document will be submitted to the RFC A revised version of this document will be submitted to the RFC
editor as an Informational Document for the Internet Community. editor as an Informational Document for the Internet Community.
A revised version of this draft document will be submitted to the RFC A revised version of this draft document will be submitted to the RFC
editor as a Proposed Standard for the Internet Community. Discussion editor as a Proposed Standard for the Internet Community. Discussion
and suggestions for improvement are requested, and should be sent to and suggestions for improvement are requested, and should be sent to
ietf-imapext@IMC.ORG. This document will expire before 24 September ietf-imapext@IMC.ORG. This document will expire before 14 November
2003. Distribution of this memo is unlimited. 2003. Distribution of this memo is unlimited.
Abstract Abstract
This document describes the base-level server-based sorting and This document describes the base-level server-based sorting and
threading extension to the [IMAP] protocol. This extension provides threading extensions to the [IMAP] protocol. These extensions
substantial performance improvements for IMAP clients which offer provide substantial performance improvements for IMAP clients which
sorted and threaded views. offer sorted and threaded views.
A server which supports the base-level SORT extension indicates this A server which supports the base-level SORT extension indicates this
with a capability name which starts with "SORT". Future, with a capability name which starts with "SORT". Future,
upwards-compatible extensions to the SORT extension will all start upwards-compatible extensions to the SORT extension will all start
with "SORT", indicating support for this base level. with "SORT", indicating support for this base level.
A server which supports this extension indicates this with one or A server which supports the THREAD extension indicates this with one
more capability names consisting of "THREAD=" followed by a supported or more capability names consisting of "THREAD=" followed by a
threading algorithm name as described in this document. This supported threading algorithm name as described in this document.
provides for future upwards-compatible extensions. This provides for future upwards-compatible extensions.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "MAY", and "OPTIONAL" in this document are to "SHOULD", "SHOULD NOT", "MAY", and "OPTIONAL" in this document are to
be interpreted as described in [KEYWORDS]. be interpreted as described in [KEYWORDS].
Base Subject Text Base Subject Text
Subject sorting and threading use the "base subject," which has Subject sorting and threading use the "base subject," which has
specific subject artifacts of deployed Internet mail software specific subject artifacts of deployed Internet mail software
removed. Due to the complexity of these artifacts, the formal syntax removed. Due to the complexity of these artifacts, the formal syntax
skipping to change at page 4, line 7 skipping to change at page 4, line 7
Sent Date Sent Date
As used in this document, the term "sent date" refers to the date and As used in this document, the term "sent date" refers to the date and
time from the Date: header, adjusted by time zone. This differs from time from the Date: header, adjusted by time zone. This differs from
date-related criteria in SEARCH, which use just the date and not the date-related criteria in SEARCH, which use just the date and not the
time, nor adjusts by time zone. time, nor adjusts by time zone.
Additional Commands Additional Commands
This command is an extension to the IMAP4rev1 base protocol. These commands are extension to the IMAP4rev1 base protocol.
The section header is intended to correspond with where it would be The section headings are intended to correspond with where they would
located in the main document if it was part of the base be located in the main document if they were part of the base
specification. specification.
6.3.SORT. SORT Command 6.4.SORT. SORT Command
Arguments: sort program Arguments: sort program
charset specification charset specification
searching criteria (one or more) searching criteria (one or more)
Data: untagged responses: SORT Data: untagged responses: SORT
Result: OK - sort completed Result: OK - sort completed
NO - sort error: can't sort that charset or NO - sort error: can't sort that charset or
criteria criteria
skipping to change at page 6, line 24 skipping to change at page 6, line 24
Example: C: A282 SORT (SUBJECT) UTF-8 SINCE 1-Feb-1994 Example: C: A282 SORT (SUBJECT) UTF-8 SINCE 1-Feb-1994
S: * SORT 2 84 882 S: * SORT 2 84 882
S: A282 OK SORT completed S: A282 OK SORT completed
C: A283 SORT (SUBJECT REVERSE DATE) UTF-8 ALL C: A283 SORT (SUBJECT REVERSE DATE) UTF-8 ALL
S: * SORT 5 3 4 1 2 S: * SORT 5 3 4 1 2
S: A283 OK SORT completed S: A283 OK SORT completed
C: A284 SORT (SUBJECT) US-ASCII TEXT "not in mailbox" C: A284 SORT (SUBJECT) US-ASCII TEXT "not in mailbox"
S: * SORT S: * SORT
S: A284 OK SORT completed S: A284 OK SORT completed
6.3.THREAD. THREAD Command 6.4.THREAD. THREAD Command
Arguments: threading algorithm Arguments: threading algorithm
charset specification charset specification
searching criteria (one or more) searching criteria (one or more)
Data: untagged responses: THREAD Data: untagged responses: THREAD
Result: OK - thread completed Result: OK - thread completed
NO - thread error: can't thread that charset or NO - thread error: can't thread that charset or
criteria criteria
skipping to change at page 7, line 8 skipping to change at page 7, line 8
There is also a UID THREAD command which corresponds to THREAD the There is also a UID THREAD command which corresponds to THREAD the
way that UID SEARCH corresponds to SEARCH. way that UID SEARCH corresponds to SEARCH.
The THREAD command first searches the mailbox for messages that The THREAD command first searches the mailbox for messages that
match the given searching criteria using the charset argument for match the given searching criteria using the charset argument for
the interpretation of strings in the searching criteria. It then the interpretation of strings in the searching criteria. It then
returns the matching messages in an untagged THREAD response, returns the matching messages in an untagged THREAD response,
threaded according to the specified threading algorithm. threaded according to the specified threading algorithm.
Sorting is in ascending order. Earlier dates sort before later All collation is in ascending order. Earlier dates collate before
dates; smaller sizes sort before larger sizes; and strings are later dates and strings are collated according to ascending values
sorted according to ascending values established by their established by their collation algorithm (see under
collation algorithm (see under "Internationalization "Internationalization Considerations").
Considerations").
The defined threading algorithms are as follows: The defined threading algorithms are as follows:
ORDEREDSUBJECT ORDEREDSUBJECT
The ORDEREDSUBJECT threading algorithm is also referred to as The ORDEREDSUBJECT threading algorithm is also referred to as
"poor man's threading." The searched messages are sorted by "poor man's threading." The searched messages are sorted by
base subject and then by the sent date. The messages are then base subject and then by the sent date. The messages are then
split into separate threads, with each thread containing split into separate threads, with each thread containing
messages with the same base subject text. Finally, the threads messages with the same base subject text. Finally, the threads
are sorted by the sent date of the first message in the thread. are sorted by the sent date of the first message in the thread.
skipping to change at page 13, line 4 skipping to change at page 12, line 48
C: A284 THREAD ORDEREDSUBJECT US-ASCII TEXT "gewp" C: A284 THREAD ORDEREDSUBJECT US-ASCII TEXT "gewp"
S: * THREAD S: * THREAD
S: A284 OK THREAD completed S: A284 OK THREAD completed
C: A285 THREAD REFERENCES UTF-8 SINCE 5-MAR-2000 C: A285 THREAD REFERENCES UTF-8 SINCE 5-MAR-2000
S: * THREAD (166)(167)(168)(169)(172)((170)(179)) S: * THREAD (166)(167)(168)(169)(172)((170)(179))
(171)(173)((174)(175)(176)(178)(181)(180)) (171)(173)((174)(175)(176)(178)(181)(180))
((177)(183)(182)(188 (184)(189))(185 186)(187)) ((177)(183)(182)(188 (184)(189))(185 186)(187))
(190)(191)(192)(193)((194)(195 196))(197 198) (190)(191)(192)(193)((194)(195 196))(197 198)
(199)(200 202)(201)(203)(204)(205 206 207)(208) (199)(200 202)(201)(203)(204)(205 206 207)(208)
S: A285 OK THREAD completed S: A285 OK THREAD completed
Note: The line breaks in the first and third client Note: The line breaks in the first and third client
responses are for editorial clarity and do not appear in responses are for editorial clarity and do not appear in
real THREAD responses. real THREAD responses.
Additional Responses Additional Responses
This response is an extension to the IMAP4rev1 base protocol. These responses are extensions to the IMAP4rev1 base protocol.
The section heading of this response is intended to correspond with The section headings of these responses are intended to correspond
where it would be located in the main document. with where they would be located in the main document.
7.2.SORT. SORT Response 7.2.SORT. SORT Response
Data: zero or more numbers Data: zero or more numbers
The SORT response occurs as a result of a SORT or UID SORT The SORT response occurs as a result of a SORT or UID SORT
command. The number(s) refer to those messages that match the command. The number(s) refer to those messages that match the
search criteria. For SORT, these are message sequence numbers; search criteria. For SORT, these are message sequence numbers;
for UID SORT, these are unique identifiers. Each number is for UID SORT, these are unique identifiers. Each number is
delimited by a space. delimited by a space.
skipping to change at page 18, line 13 skipping to change at page 18, line 13
should be transmitted in Internet mail messages. should be transmitted in Internet mail messages.
12. IANA Considerations 12. IANA Considerations
IMAP4 capabilities are registered by publishing a standards track or IMAP4 capabilities are registered by publishing a standards track or
IESG approved experimental RFC. The registry is currently located IESG approved experimental RFC. The registry is currently located
at: at:
http://www.iana.org/assignments/imap4-capabilities http://www.iana.org/assignments/imap4-capabilities
In addition, additional threading algorithms also need to be This document consitutes registration of the SORT and THREAD IMAP
registered with IANA. capabilities, as well as the ORDEREDSUBJECT and REFERENCES IMAP
threading algorithms.
A. References A. References
The following documents are normative to this document: The following documents are normative to this document:
[ABNF] Crocker, D., and Overell, P. "Augmented BNF for Syntax [ABNF] Crocker, D., and Overell, P. "Augmented BNF for Syntax
Specifications: ABNF", RFC 2234, November 1997. Specifications: ABNF", RFC 2234, November 1997.
[IMAP] Crispin, M., "Internet Message Access Protocol - Version [IMAP] Crispin, M., "Internet Message Access Protocol - Version
4rev1", RFC 3501, March 2003. 4rev1", RFC 3501, March 2003.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/