[Dovecot] THREAD REFERENCES bug
Michael M Slusarz
slusarz at curecanti.org
Thu Jun 13 01:03:01 EEST 2013
Quoting "A.L.E.C" <alec at alec.pl>:
> On 06/12/2013 08:53 AM, A.L.E.C wrote:
>> C: A0003 UID THREAD REFERENCES US-ASCII ALL
>> S: * THREAD (12)((11)(16))(14)
>> I expected 16 (or more likely 11 and 16) to be at the end of the result,
>> after 14, i.e. (12)(14)((11)(16)).
> I see the same in Cyrus. So, maybe this is how REFERENCES is supposed to
> work. RFC is not clear to me. I'm curious if THREAD=REFS works as I expect.
Dovecot/Cyrus is correct. Threading is sorted by the date of the
*first* (i.e. root) message in the thread.
RFC 5256 (from the references sorting algorithm):
(2) Gather together all of the messages that have no parents
and make them all children (siblings of one another) of a
dummy parent (the "root"). These messages constitute the
first (head) message of the threads created thus far.
(4) Sort the messages under the root (top-level siblings only)
by sent date as described in section 2.2. In the case of a
dummy message, sort its children by sent date and then use
the first child for the top-level sort.
In this case, message 11 is a "head" message - since it has no parents
- and thus it is the message used for the date sort in Step 4.
More information about the dovecot