<<< Date Index >>>     <<< Thread Index >>>

Re: index sort



David Yitzchak Cohen --> mutt-users (2004-07-21 04:09:17 -0400):
> On Tue, Jul 20, 2004 at 12:37:19PM EDT, Jukka Salmi wrote:
> 
> > I don't really understand how Mutt sorts messages in the index menu.
[...]
> 
> I'm going to take an off-handed guess that imapsync probably adds a
> Received: header or something like that, making your IMAP server assume
> a different date received.  I haven't looked at imapsync, though, so I
> obviously don't know.

I don't speak Perl (imapsync is written in Perl), but it seems the
script doesn't alter the message at all, it just copies it from one
IMAP server to another.

I found the answer to my original question while reading the Mutt
sources: when using the date-received sorting option on an IMAP
message store, Mutt compares the INTERNALDATE data item of the
message. And since I unintentionally reset that data item while
running imapsync, Mutt now sorts messages in hierarchical order
(the order in which imapsync copied them over). (Hmm, that will
be really difficult to fix, mailboxes are totally out of sync by
now...)

Bottom line (for the archives): when copying an IMAP mailbox using
imapsync, use the --syncinternaldates option, otherwise Mutt sorts
messages not as (at least I) expected.


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~