<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Wrong sorting by date in IMP</title> 
  <pubDate>Fri, 10 Apr 2026 13:36:23 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/10967</link> 
  <atom:link rel="self" type="application/rss+xml" title="Wrong sorting by date in IMP" href="https://bugs.horde.org/ticket/10967/rss" /> 
  <description>Wrong sorting by date in IMP</description> 
 
   
   
  <item> 
   <title>IMP is doing bad sort by date in any folder. We are using Cy</title> 
   <description>IMP is doing bad sort by date in any folder. We are using Cyrus 2.2.13, folder is correct (to be absolutly sure we do reconstruct too) and when talking to cyrus via telnet and doing sort - everything is okay. But see attachment, sort by date is not valid (not only in this screenshot).</description> 
   <pubDate>Mon, 06 Feb 2012 16:47:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70177</link> 
  </item> 
   
  <item> 
   <title>You are most likely sorting by arrival, not date.</title> 
   <description>You are most likely sorting by arrival, not date.</description> 
   <pubDate>Mon, 06 Feb 2012 19:20:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70178</link> 
  </item> 
   
  <item> 
   <title>&gt; You are most likely sorting by arrival, not date.

Since</title> 
   <description>&gt; You are most likely sorting by arrival, not date.

Since this is the default date sort, this is almost certainly what is happening.  I cannot reproduce.  Closing unless this can be reliably reproduced as incorrect.</description> 
   <pubDate>Wed, 08 Feb 2012 03:25:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70201</link> 
  </item> 
   
  <item> 
   <title>Here is a screencast whats happening. When I sort by message</title> 
   <description>Here is a screencast whats happening. When I sort by message or arrival time I have same results (page is reloading correctly). Currently don&#039;t know why - can dive into source, but not now (too much tasks in work). Tell me what do you need, I&#039;ll try to help.
</description> 
   <pubDate>Wed, 08 Feb 2012 09:59:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70210</link> 
  </item> 
   
  <item> 
   <title>Sorry SWF did not atach, trying again as zip :-)
</title> 
   <description>Sorry SWF did not atach, trying again as zip :-)
</description> 
   <pubDate>Wed, 08 Feb 2012 10:01:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70211</link> 
  </item> 
   
  <item> 
   <title>Hmm, sorry unable to attach, here is link:
http://users.fs.</title> 
   <description>Hmm, sorry unable to attach, here is link:
http://users.fs.cvut.cz/jiri.solc/horde/20120208_1047_28.swf
</description> 
   <pubDate>Wed, 08 Feb 2012 10:05:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70212</link> 
  </item> 
   
  <item> 
   <title>&gt; Here is a screencast whats happening. When I sort by messa</title> 
   <description>&gt; Here is a screencast whats happening. When I sort by message or 
&gt; arrival time I have same results (page is reloading correctly). 
&gt; Currently don&#039;t know why - can dive into source, but not now (too 
&gt; much tasks in work). Tell me what do you need, I&#039;ll try to help.

You will need to provide IMAP logs during the page loads when you are switching to date sort and then switching between date sorts.



To further debug this issue, we need details of the IMP -&gt; IMAP/POP communication.

To enable debugging, see instructions contained in imp/config/backends.php (the &#039;debug&#039; config parameter).  

Debugging should not be enabled on a production server,   Attach/post only the portion of the log that directly deals with the problem reported (it may be simplest to clear the log file and then perform the event that causes the error).</description> 
   <pubDate>Tue, 14 Feb 2012 04:52:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70286</link> 
  </item> 
   
  <item> 
   <title>Sorry for delay (vacation and other work taks)...
Here is a</title> 
   <description>Sorry for delay (vacation and other work taks)...
Here is a log when sorting by delivery date (bad in both traditional and dynamic)
</description> 
   <pubDate>Tue, 28 Feb 2012 11:36:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70516</link> 
  </item> 
   
  <item> 
   <title>And here is log for sorting by message date (wrong too).
</title> 
   <description>And here is log for sorting by message date (wrong too).
</description> 
   <pubDate>Tue, 28 Feb 2012 11:37:37 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70517</link> 
  </item> 
   
  <item> 
   <title>&gt; Sorry for delay (vacation and other work taks)...
&gt; Here </title> 
   <description>&gt; Sorry for delay (vacation and other work taks)...
&gt; Here is a log when sorting by delivery date (bad in both traditional 
&gt; and dynamic)

No, this looks like sort by arrival date:

C: 3 UID SEARCH UNDELETED
S: * SEARCH 274 401 839 840 842 845 1165 9461 9477 9994 10015 11295 11643 11735 11736 19664 21797 22720 23659 24476 26511 26548 26551 26552

Check your prefs.</description> 
   <pubDate>Wed, 29 Feb 2012 23:37:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70549</link> 
  </item> 
   
  <item> 
   <title>&gt; And here is log for sorting by message date (wrong too).
</title> 
   <description>&gt; And here is log for sorting by message date (wrong too).

This looks even more like a search for arrival date (NOT message date):

C: 3 UID SORT (ARRIVAL) US-ASCII UNDELETED
S: * SORT 274 401 839 840 842 845 1165 9461 9477 9994 10015 11295 11643 11735 11736 19664 21797 22720 23659 24476 26511 26548 26551 26552</description> 
   <pubDate>Wed, 29 Feb 2012 23:37:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70550</link> 
  </item> 
   
  <item> 
   <title>It would also be more useful if you could clear your cache a</title> 
   <description>It would also be more useful if you could clear your cache and provide the full IMAP logs of a single login.  E.g. login, sort a mailbox by arrival date, and then switch sorting to message date.</description> 
   <pubDate>Wed, 29 Feb 2012 23:40:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70551</link> 
  </item> 
   
  <item> 
   <title>&gt; It would also be more useful if you could clear your cache</title> 
   <description>&gt; It would also be more useful if you could clear your cache and 
&gt; provide the full IMAP logs of a single login.  E.g. login, sort a 
&gt; mailbox by arrival date, and then switch sorting to message date.
 
 Here is it</description> 
   <pubDate>Thu, 08 Mar 2012 08:06:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70640</link> 
  </item> 
   
  <item> 
   <title>&gt; It would also be more useful if you could clear your cache</title> 
   <description>&gt; It would also be more useful if you could clear your cache and 
&gt; provide the full IMAP logs of a single login.  E.g. login, sort a 
&gt; mailbox by arrival date, and then switch sorting to message date.

 And here is screenshot.
</description> 
   <pubDate>Thu, 08 Mar 2012 08:11:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70641</link> 
  </item> 
   
  <item> 
   <title>The sorting is exactly right.

Your messages:

UID 840 =</title> 
   <description>The sorting is exactly right.

Your messages:

UID 840 = Mon, 01 Feb 2010 18:41:58 +0100
UID 842 = Sat, 19 Dec 2009 21:47:03 +0100
UID 845 = Sat, 19 Dec 2009 21:47:03 +0100
UID 1165 = Wed, 18 Aug 2010 08:55:56 +0200

Sure enough, the sorting is correct:

C: 3 UID SORT (ARRIVAL) US-ASCII UNDELETED
S: * SORT 840 842 845 1165

And can be verified since UIDs are always increasing in a mailbox based on arrival date.

There is no attempt to sort by *message* date in this log.  Arrival date != message date.</description> 
   <pubDate>Tue, 13 Mar 2012 09:45:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70694</link> 
  </item> 
   
  <item> 
   <title>&gt; The sorting is exactly right.
[..snip..]
&gt; There is no a</title> 
   <description>&gt; The sorting is exactly right.
[..snip..]
&gt; There is no attempt to sort by *message* date in this log.  Arrival 
&gt; date != message date.

 Yes, I know this difference. And that is the problem. We did sorting by message date and it&#039;s not visible in any logs. Maybe old Cyrus (2.2) implementation? </description> 
   <pubDate>Mon, 26 Mar 2012 11:22:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t70881</link> 
  </item> 
   
  <item> 
   <title>&gt; The sorting is exactly right.
&gt;
&gt; Your messages:
&gt;
&gt; U</title> 
   <description>&gt; The sorting is exactly right.
&gt;
&gt; Your messages:
&gt;
&gt; UID 840 = Mon, 01 Feb 2010 18:41:58 +0100
&gt; UID 842 = Sat, 19 Dec 2009 21:47:03 +0100
&gt; UID 845 = Sat, 19 Dec 2009 21:47:03 +0100
&gt; UID 1165 = Wed, 18 Aug 2010 08:55:56 +0200
&gt;
&gt; Sure enough, the sorting is correct:
&gt;
&gt; C: 3 UID SORT (ARRIVAL) US-ASCII UNDELETED
&gt; S: * SORT 840 842 845 1165
&gt;
&gt; And can be verified since UIDs are always increasing in a mailbox 
&gt; based on arrival date.
&gt;
&gt; There is no attempt to sort by *message* date in this log.  Arrival 
&gt; date != message date.

Michael .. sorry .. but you are wrong.

From for me unknow reason latest thunderbird can occasionaly run after start and login  weird proces. During this process:
a) delete message
b) create same message again

I know it cuz i have special hook in cyrus and i log every change as read, delete, purge, and etc/

I think that you can&#039;t rely on UID anymore :(</description> 
   <pubDate>Tue, 29 May 2012 12:58:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t71465</link> 
  </item> 
   
  <item> 
   <title>&gt; I think that you can&#039;t rely on UID anymore :(

Of course</title> 
   <description>&gt; I think that you can&#039;t rely on UID anymore :(

Of course you can.

*Please* read RFC 3501. The definition of UIDs (Section 2.3.1.1):

...Unique identifiers are assigned in a strictly ascending fashion in the mailbox; as each message is added to the mailbox it is assigned a higher UID than the message(s) which were added previously...</description> 
   <pubDate>Tue, 29 May 2012 16:30:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t71466</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I think that you can&#039;t rely on UID anymore :(
&gt;
&gt; Of co</title> 
   <description>&gt;&gt; I think that you can&#039;t rely on UID anymore :(
&gt;
&gt; Of course you can.
&gt;
&gt; *Please* read RFC 3501. The definition of UIDs (Section 2.3.1.1):
&gt;
&gt; ...Unique identifiers are assigned in a strictly ascending fashion in 
&gt; the mailbox; as each message is added to the mailbox it is assigned a 
&gt; higher UID than the message(s) which were added previously...

Yes. It&#039;s RFC. I spoke about bug in thunderbird which change uid of mails. It takes some mails (not all -  forexample 900 from 2200).

First step, it delete msg.
Second step, it add deleted msg back and msg have new - higher uid.

Is&#039;t prohibited by any RFC?

forexample:

-rw------- 1 root root     1966 2012-05-29 10:34:35.000000000 +0200 17034.
-rw------- 1 root root     1755 2012-05-29 10:20:36.000000000 +0200 17033.
-rw------- 1 root root    72072 2012-05-29 09:48:14.000000000 +0200 17032.
-rw------- 1 root root     3190 2012-05-28 23:08:04.000000000 +0200 17031.
-rw------- 1 root root  7058824 2012-05-28 18:56:39.000000000 +0200 17030.
-rw------- 1 root root   909212 2012-05-28 18:20:08.000000000 +0200 17029.
-rw------- 1 root root    60816 2012-05-28 18:03:39.000000000 +0200 17028.
-rw------- 1 root root    51626 2012-05-28 15:56:00.000000000 +0200 17026.
-rw------- 1 root root    52181 2012-05-28 15:04:31.000000000 +0200 16186.
-rw------- 1 root root    59747 2012-05-28 14:41:16.000000000 +0200 16187.
-rw------- 1 root root     2230 2012-05-28 10:19:54.000000000 +0200 16189.
-rw------- 1 root root    80081 2012-05-28 10:17:30.000000000 +0200 16182.
-rw------- 1 root root     4904 2012-05-28 09:58:57.000000000 +0200 16188.
-rw------- 1 root root    54790 2012-05-28 09:32:07.000000000 +0200 16190.
-rw------- 1 root root     3407 2012-05-28 09:09:37.000000000 +0200 16193.
-rw------- 1 root root     2341 2012-05-28 08:59:45.000000000 +0200 16192.
-rw------- 1 root root    42263 2012-05-28 08:52:39.000000000 +0200 16191.
-rw------- 1 root root     5841 2012-05-28 08:22:53.000000000 +0200 16198.
-rw------- 1 root root     3423 2012-05-28 08:13:12.000000000 +0200 16197.
-rw------- 1 root root    16184 2012-05-28 08:00:07.000000000 +0200 16196.
-rw------- 1 root root     7166 2012-05-26 23:19:37.000000000 +0200 16195.
-rw------- 1 root root    11320 2012-05-25 17:01:20.000000000 +0200 16194.
(i set time under time of mails .. in the fact hundreds mails have same time but then is hard ilustrate problem)

If you sorting these mails under uid then you get only mess.  

Thunderdird and Outlook doesnt have this kind of problem cuz they are sorting under time and not under uid. It&#039;s not bug in horde algo. Horde isnt immune to this kind of problem and change sorting under time and not under uid will make horde better - it will make horde immunne to thunderbird crap :).  Sorting under time have no hole. Under uid obviously have :(.</description> 
   <pubDate>Tue, 29 May 2012 20:42:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10967#t71468</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
