[dovecot] Re: message order reversed on copying

Timo Sirainen tss at iki.fi
Sun Apr 6 22:55:29 EEST 2003


On Sun, 2003-04-06 at 22:12, Charlie Brady wrote:
> > Better fix for this comes once I add support for UIDPLUS IMAP extension.
> > That requires knowing the new UID for mail in destination mailbox, so I
> > have to update the indexes immediately, which also saves the mail order
> > permanently.
> 
> You shouldn't need to do that. All you need to do is to sort the new 
> message files (by name or by mtime - by name will be faster), before 
> processing them.

Yes, well, that does it too :)

> +  nfiles = scandir (tmp, &names, NULL, maildir_namesort);

scandir() isn't portable though. I'll just read them into array and
qsort() them. I pretty much have to do that anyway with the new scanning
code which uses (NFS-safe) .uidlist file to find out if the message
already has UID.

> As a workaround, Kimura, you can delete dovecot's .imap.* index files, and 
> the new UIDs will be sorted again - until next time.

Which changes UIDVALIDITY and forces clients to discard their cache. Not
too good idea. Pretty much the same as just disabling the index files.




More information about the dovecot mailing list