[horde] IMP sort by date

Chris St. Pierre stpierre at NebrWesleyan.edu
Thu Aug 24 14:51:07 PDT 2006


Okay, I turned on telemetry logs for the user and checked her email.

I should think that the relevant command would be:

<0000000a UID SORT (REVERSE DATE) US-ASCII ALL

The response starts:

* SORT 2727 2726 2725 2728 2724 2723 2720 224 339 2698 2697

As you can see #223 has dropped off the list but numbers 224 and 339
have actually moved *up* the list -- they've gotten newer somehow.

Andrew, your comment seems to suggest that your problem solved itself
-- could that be what's starting to happen with #223 dropping off the
list.

It almost looks like it could be a Cyrus issue at this point -- when
asked to SORT the messages, Cyrus is returning a bogus list.  That
doesn't explain why other clients, like Pine, sort it fine, though.

My c-client library is the newest version supplied by RHEL 4:

Name        : libc-client                  Relocations: (not
relocatable)
Version     : 2002e                             Vendor: Red Hat, Inc.
Release     : 14                            Build Date: Mon 28 Nov
2005 10:34:59 AM CST

Further down the rabbit hole....

Thanks for all your help with this!

Chris St. Pierre
Unix Systems Administrator
Nebraska Wesleyan University

On Thu, 24 Aug 2006, Michael M Slusarz wrote:

> Quoting Andrew Morgan <morgan at orst.edu>:
>
>> On Thu, 24 Aug 2006, Chris St. Pierre wrote:
>>
>> >Hrm, that doesn't seem to make sense either.  Here's a snippet from
>> >the inbox page in IMP:
>> >
>> >2446	 09:54:04 AM ...
>> >223	 02/21/2002	...
>> >224	 02/21/2002	...
>> >339	 12/31/1903	...
>> >2445	 06:32:26 AM ...
>> >
>> >I got into my IMAP server (Cyrus, btw) and asked for the INTERNALDATE
>> >fields of these five messages.  (As an aside, it's remarkably helpful
>> >to have the message numbers right there.  Thanks, Horde team!)  Here's
>> >what I got:
>> >
>> >* 2446 FETCH (INTERNALDATE "24-Aug-2006 09:55:30 -0500")
>> >* 223 FETCH (INTERNALDATE "20-Aug-2006 09:32:03 -0500")
>> >* 224 FETCH (INTERNALDATE "20-Aug-2006 09:32:03 -0500")
>> >* 339 FETCH (INTERNALDATE "20-Aug-2006 09:32:04 -0500")
>> >* 2445 FETCH (INTERNALDATE "24-Aug-2006 06:32:34 -0500")
>> >
>> >As you can see, messages 2445 and 2446 are sorted correctly, but the
>> >others all have INTERNALDATEs of several days ago, when we migrated to
>> >Cyrus -- they don't have INTERNALDATEs between 6:32 am and 9:55 am
>> >today.  Why would they be sorted as if they were?
>>
>> Ha, we had the same sort of thing happen when we migrated from UW-IMAP to
>> Cyrus.  :)  But, everything worked normally after the migration.  New messages
>> were correctly sorted by arrival time.
>>
>> Since you run Cyrus, maybe you can turn on the telemetry log for this
>> particular person and see the exact IMAP protocol command that happens here?
>> From what I can see in the IMP code, it does:
>>
>>  $sorted = imap_sort($imp['stream'], $prefs->getValue('sortby'),
>>                      $prefs->getValue('sortdir'), SE_UID);
>>
>> So unless the sortby preference is wonky somehow, it should be using arrival
>> date...
>
> If I remember correctly, imap_sort() actually does the sorting internally (i.e.
> in c-client) instead of on the server.  So your issue might be a buggy version
> of c-client.
>
> michael
>
> ___________________________________
> Michael Slusarz [slusarz at horde.org]
> -- 
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>


More information about the horde mailing list