Incorrect sort order when sorting by date
Andy Bennett
andyjpb at ashurst.eu.org
Mon May 18 09:22:09 EDT 2009
Hi,
> I bet if you look at the Date headers of the problem emails, you'll find
> that they're not RFC compliant.
>
> The cyrus date parser is very strict, and if the header isn't RFC
> compliant, you'll get a bad value, and bad sorting.
>
> Looking at the RFC
>
> http://www.faqs.org/rfcs/rfc5256.html
>
> If the sent date cannot be determined (a Date: header is missing or
> cannot be parsed), the INTERNALDATE for that message is used as the
> sent date.
>
> I'm not cyrus is actually doing this though,
I've got several wonky dates:
Date: Wed, 31 Dec 3609 10:05:57 +0800
Date: , 28 Dec 2008 13:23:13 +0100
Date: , 28 Dec 2008 14:36:35 +0800
I'm not sure if 3609 is a valid year but, despite the fact it's a
blatant lie, it doesn't seem to be syntactically invalid. It shows up in
the listing as "06.01.2010 01:00" but that date (6/1) doesn't appear
in any of the headers. I'd expect this message to sort first in
descending order.
The ones without days of week are just plain wrong. I wouldn't expect
them to sort before (in descending order) my other, valid, messages in 2009.
I assume that INTERNALDATE will end up being the time that cyrus
actually receives a message. In that case I wouldn't expect the
offending messages (28/12/2008) to continually sort before all other
messages in the mailbox.
Regards,
@ndy
--
andyjpb at ashurst.eu.org
http://www.ashurst.eu.org/
http://www.gonumber.com/andyjpb
0x7EBA75FF
More information about the Info-cyrus
mailing list