draft-ietf-imapext-thread-05.txt   draft-ietf-imapext-thread-06.txt 
IMAP Extensions Working Group M. Crispin IMAP Extensions Working Group M. Crispin
Internet Draft: IMAP THREAD K. Murchison Internet Draft: IMAP THREAD K. Murchison
Document: internet-drafts/draft-ietf-imapext-thread-05.txt November 2000 Document: internet-drafts/draft-ietf-imapext-thread-06.txt December 2000
INTERNET MESSAGE ACCESS PROTOCOL - THREAD EXTENSION INTERNET MESSAGE ACCESS PROTOCOL - THREAD EXTENSION
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
skipping to change at page 1, line 34 skipping to change at page 1, line 34
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt http://www.ietf.org/ietf/1id-abstracts.txt
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 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. editor as a Proposed Standard for the Internet Community.
Discussion and suggestions for improvement are requested, and should Discussion and suggestions for improvement are requested, and should
be sent to ietf-imapext@IMC.ORG. This document will expire before 14 be sent to ietf-imapext@IMC.ORG. This document will expire before 27
May 2001. Distribution of this memo is unlimited. June 2001. Distribution of this memo is unlimited.
Abstract Abstract
This document describes the server-based threading extension to the This document describes the server-based threading extension to the
IMAP4rev1 protocol. This extension provides substantial performance IMAP4rev1 protocol. This extension provides substantial performance
improvements for IMAP clients which offer threaded views. improvements for IMAP clients which offer threaded views.
A server which supports this extension indicates this with one or A server which supports this extension indicates this with one or
more capability names consisting of "THREAD=" followed by a supported more capability names consisting of "THREAD=" followed by a supported
threading algorithm name as described in this document. This threading algorithm name as described in this document. This
skipping to change at page 4, line 10 skipping to change at page 4, line 10
with the same extracted subject text. Finally, the threads are with the same extracted subject text. Finally, the threads are
sorted by the sent date of the first message in the thread. sorted by the sent date of the first message in the thread.
Note that each message in a thread is a child (as opposed to a Note that each message in a thread is a child (as opposed to a
sibling) of the previous message. sibling) of the previous message.
REFERENCES REFERENCES
The REFERENCES threading algorithm is based on the algorithm The REFERENCES threading algorithm is based on the algorithm
written by Jamie Zawinski which was used in "Netscape Mail and written by Jamie Zawinski which was used in "Netscape Mail and
News" versions 2.0 through 3.0. For details, see News" versions 2.0 through 3.0. For details, see
http://www.jwz.org/docs/threading.html. http://www.jwz.org/doc/threading.html.
This algorithm threads the searched messages by grouping them This algorithm threads the searched messages by grouping them
together in parent/child relationships based on which messages together in parent/child relationships based on which messages
are replies to others. The parent/child relationships are are replies to others. The parent/child relationships are
built using two methods: reconstructing a message's ancestry built using two methods: reconstructing a message's ancestry
using the references contained within it; and checking the using the references contained within it; and checking the
subject of a message to see if it is a reply to (or forward of) subject of a message to see if it is a reply to (or forward of)
another. another.
The references used for reconstructing a message's ancestry are The references used for reconstructing a message's ancestry are
skipping to change at page 6, line 23 skipping to change at page 6, line 23
If it is a dummy message with NO children, delete it. If it is a dummy message with NO children, delete it.
If it is a dummy message with children, delete it, but If it is a dummy message with children, delete it, but
promote its children to the current level. In other words, promote its children to the current level. In other words,
splice them in with the dummy's siblings. splice them in with the dummy's siblings.
Do not promote the children if doing so would make them Do not promote the children if doing so would make them
children of the root, unless there is only one child. children of the root, unless there is only one child.
(4) Sort the messages under the root (top-level siblings only) (4) Sort the messages under the root (top-level siblings only)
by sent date. In the case of an exact match on sent date, use by sent date. In the case of an exact match on sent date or if
the order in which the messages appear in the mailbox (that is, either of the Date: headers used in a comparison can not be
by sequence number) to determine the order. In the case of a parsed, use the order in which the messages appear in the
dummy message use its first child for sorting. mailbox (that is, by sequence number) to determine the order.
In the case of a dummy message, sort its children by sent date
and then use the first child for the top-level sort.
(5) Gather together messages under the root that have the same (5) Gather together messages under the root that have the same
extracted subject text. extracted subject text.
(A) Create a table for associating extracted subjects with (A) Create a table for associating extracted subjects with
messages. messages.
(B) Populate the subject table with one message per (B) Populate the subject table with one message per
extracted subject. For each child of the root: extracted subject. For each child of the root:
skipping to change at page 8, line 4 skipping to change at page 8, line 6
children). children).
Otherwise, create a new dummy message and make both Otherwise, create a new dummy message and make both
the current message and the message in the table the current message and the message in the table
children of the dummy. Then replace the message in children of the dummy. Then replace the message in
the table with the dummy message. the table with the dummy message.
Note: Subject comparisons are case-insensitive, as Note: Subject comparisons are case-insensitive, as
described under "Internationalization described under "Internationalization
Considerations." Considerations."
(6) Traverse the messages under the root and sort each set of (6) Traverse the messages under the root and sort each set of
siblings by sent date. Traverse the messages in such a way siblings by sent date. Traverse the messages in such a way
that the "youngest" set of siblings are sorted first, and the that the "youngest" set of siblings are sorted first, and the
"oldest" set of siblings are sorted last (grandchildren are "oldest" set of siblings are sorted last (grandchildren are
sorted before children, etc). In the case of an exact match on sorted before children, etc). In the case of an exact match on
sent date, use the order in which the messages appear in the sent date or if either of the Date: headers used in a
mailbox (that is, by sequence number) to determine the order. comparison can not be parsed, use the order in which the
In the case of a dummy message (which can only occur with top- messages appear in the mailbox (that is, by sequence number) to
level siblings), use its first child for sorting. determine the order. In the case of a dummy message (which can
only occur with top-level siblings), use its first child for
sorting.
Example: C: A283 THREAD ORDEREDSUBJECT UTF-8 SINCE 5-MAR-2000 Example: C: A283 THREAD ORDEREDSUBJECT UTF-8 SINCE 5-MAR-2000
S: * THREAD (166)(167)(168)(169)(172)(170)(171) S: * THREAD (166)(167)(168)(169)(172)(170)(171)
(173)(174 175 176 178 181 180)(179)(177 183 (173)(174 175 176 178 181 180)(179)(177 183
182 188 184 185 186 187 189)(190)(191)(192) 182 188 184 185 186 187 189)(190)(191)(192)
(193)(194 195)(196 197 198)(199)(200 202)(201) (193)(194 195)(196 197 198)(199)(200 202)(201)
(203)(204)(205)(206 207)(208) (203)(204)(205)(206 207)(208)
S: A283 OK THREAD completed S: A283 OK THREAD completed
C: A284 THREAD ORDEREDSUBJECT US-ASCII TEXT "gewp" C: A284 THREAD ORDEREDSUBJECT US-ASCII TEXT "gewp"
S: * THREAD S: * THREAD
skipping to change at page 10, line 7 skipping to change at page 10, line 7
\-- 6 \-- 6
|-- 4 |-- 4
| \-- 23 | \-- 23
| |
\-- 44 \-- 44
\-- 7 \-- 7
\-- 96 \-- 96
Example: S: * THREAD ((3)(5)) Example: S: * THREAD ((3)(5))
In this example, 3 and 5 are siblings of a parent which does not In this example, 3 and 5 are siblings of a parent which does not
match the search critieria (and/or does not exist in the mailbox); match the search criteria (and/or does not exist in the mailbox);
however they are members of the same thread. however they are members of the same thread.
Formal Syntax of THREAD commands and Responses Formal Syntax of THREAD commands and Responses
thread-data = "THREAD" [SP 1*thread-list] thread-data = "THREAD" [SP 1*thread-list]
thread-list = "(" thread-members / thread-nested ")" thread-list = "(" thread-members / thread-nested ")"
thread-members = nz-number *(SP nz-number) [SP thread-nested] thread-members = nz-number *(SP nz-number) [SP thread-nested]
thread-nested = 2*thread-list thread-nested = 2*thread-list
thread = ["UID" SP] "THREAD" SP thread-algorthm thread = ["UID" SP] "THREAD" SP thread-algorithm
SP search-charset 1*(SP search-key) SP search-charset 1*(SP search-key)
thread-algorithm = "ORDEREDSUBJECT" / "REFERENCES" / atom thread-algorithm = "ORDEREDSUBJECT" / "REFERENCES" / atom
The following syntax describes subject extraction rules (2)-(6): The following syntax describes subject extraction rules (2)-(6):
subject = *subj-leader [subj-middle] *subj-trailer subject = *subj-leader [subj-middle] *subj-trailer
subj-refwd = ("re" / ("fw" ["d"])) *WSP [subj-blob] ":" subj-refwd = ("re" / ("fw" ["d"])) *WSP [subj-blob] ":"
 End of changes. 

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