Incorrect sort order when sorting by date
Robert Mueller (web)
robm at fastmail.fm
Mon May 18 08:21:58 EDT 2009
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,
Rob
On Mon, 18 May 2009 12:18 +0100, "Gavan Fantom" <gavan at coolfactor.org>
wrote:
> I have been running cyrus imapd for several years now. I recently
> installed roundcube, to provide access to email on those occasions when
> a proper IMAP client isn't available.
>
> Unlike Thunderbird, roundcube relies on IMAP SORT. When sorting by date,
> some emails from the past are presented as newer than the most recent
> messages.
>
> There is nothing in the headers which looks particuraly different, and
> those messages are stored in the correct order in the filesystem. The
> timestamp on the messages is consistent with the Date: header.
>
> I verified that this was imapd getting it wrong, using
>
> UID SORT (DATE) UTF-8 ALL
>
> It returned messages in the same order as roundcube had displayed them.
>
> One of the messages was from March this year (a facebook notification
> message, much the same as many other such messages - there really was
> nothing to stand out about this one) and the other messages were
> periodic updates from another website, spread across the last couple of
> years. Again, there was nothing particularly special that I could see
> about the headers in any of these messages.
>
> I tried running reconstruct on the folder after renaming the
> cyrus.{cache,header,index} files. Suspiciously, it recreated absolutely
> identical files. Perhaps it found the files that I had renamed.
>
> I see that this exact problem has been asked about before:
>
> http://lists.andrew.cmu.edu/pipermail/info-cyrus/2006-August/023316.html
>
> but there was no reply at the time. I also couldn't find a report about
> this issue in bugzilla.
>
> I am running cyrus imapd 2.2.13 on NetBSD, as installed from pkgsrc.
>
> Does anybody understand what is causing this?
>
> --
> Gillette - the best a man can forget
> ----
> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
robm at fastmail.fm
Sign up at http://fastmail.fm for fast, ad free, IMAP accessible email
More information about the Info-cyrus
mailing list