[Tickets #8936] Clean up date/arrival/sequence sorting

bugs at horde.org bugs at horde.org
Fri Mar 26 22:14:29 UTC 2010


Ticket URL: http://bugs.horde.org/ticket/8936
  Ticket             | 8936
  Created By         | Michael Slusarz <slusarz at horde.org>
  Summary            | Clean up date/arrival/sequence sorting
  Queue              | IMP
  Version            | Git master
  Type               | Enhancement
  State              | Accepted
  Priority           | 1. Low
  Milestone          | 5.0
  Patch              |
  Owners             |

Michael Slusarz <slusarz at horde.org> (2010-03-26 18:14) wrote:

Date sort = date in message
Arrival sort = internal imap date of message
sequence sort = straight numeric sort of sequence numbers (order in  
which messages were added to the mailbox)

Sequence sort needs to be default because it is the only reasonable  
sort that can be done without parsing headers across all IMAP servers

Arrival sort in IMP 4.x referred to sequence sort - arrival sort was  
never defined in RFC 3501 but it makes sense that it is the arrival  
order into the mailbox.  Additionally, arrival/sequence sort (at least  
in IMP) had the sequence numbers which clearly indicates the sort was  
being done on sequence numbers (not that this means anything to the  
average user).  Then RFC 5256 goes and confuses thing but defining a  
SORT ARRIVAL which sorts by internaldate.

In IMP 5, to clean this up, do the following:
1.) Rewrite Horde_Imap_Client to handle sequence sort - obtained doing  
a SEARCH (not a SORT on imap servers that support the latter) and then  
doing numeric sorting on the client side.
2.) IMP defaults to sequence sort for same reason as in IMP 4.x.
3.) Only display one type of date search in mailbox headings.   
Determining whether this does a Header Date or an Internaldate search  
is left to a preference, locked by default.  By default, resort to  
Internaldate (since this tends to be more accurate than the Date  
header - see, e.g., Spam headers dated way in the future/past).
4.) Determine how to allow user to resort back to sequence sort.  Call  
this sort "no sorting'.

More information about the bugs mailing list