I found it on an ancient dovecot version, so it might be already fixed. Let's say I have a folder with 3 messages UID Subject Date 12 One 2013-06-09 11 Testmail 2013-06-10 14 Subject 2013-06-11 C: A0003 UID THREAD REFERENCES US-ASCII ALL S: * THREAD (12)(11)(14) Now I received a message with today's date (2013-06-12) with subject "Testmail" (the same as message with uid=11. The new message has uid=16. 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)). The problem for a user is when he has more messages in a folder. When user receives a new message sometimes (on subject duplicate) he will not see it because it will be somewhere in the middle of the result, but should be on top. -- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net] --------------------------------------------------- PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://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. -- Aleksander 'A.L.E.C' Machniak LAN Management System Developer [http://lms.org.pl] Roundcube Webmail Developer [http://roundcube.net] --------------------------------------------------- PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
Quoting "A.L.E.C" alec@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.
michael
participants (2)
-
A.L.E.C
-
Michael M Slusarz