[Dovecot] UID order vs date order

Robert Schetterer rs at sys4.de
Sun Nov 17 21:11:32 EET 2013



Am 17.11.2013 19:27, schrieb LuKreme:
> 
> On 17 Nov 2013, at 03:20 , Torbjorn Jansson <torbjorn.jansson at mbox200.swipnet.se> wrote:
> 
>> Hi
>>
>> i have recently moved a mailbox to dovecot and intend to use it via imap and i have run into a problem.
>>
>> when i imported the mails apparently the UID order got reversed compared to the date order, result is that some clients like on android devices download the oldest mails instead of newest.
>> it is not so interesting to have several years old mail show up at the top of the mailbox.
>>
>> is there any way of convincing dovecot to renumber the mails by date order instead?
> 
> Probably the easiest solution is to figure out what you did in the import to cause this and reimport the mails. Short of that, the only thing you can do (assuming you are using Maildir, right?) is to get the date out of the mail and rewrite the filename with the correct epoch timestamp.
> 
> It would be great if there was a way to use doveadm to do this, but short of that you just have to fix it yourself. The good news is, with gnu date it’s pretty simple.
> 
>  $ date --date='2013-11-17 01:23:45 +0700' +%s
> 1384626225
>  $ gdate --date='November 17, 2013 01:23:45 +0700' +%s
> 1384626225
>  $ gdate --date='17 Nov 2013 01:23:45 +0700' +%s
> 1384626225
> 
>> i cant be the only one that have run into this.
> 
> I had a similar problem, but I ignored it and as new mail came in, the problem went away (mostly) on its own. :/
> 
> 

http://www.five-ten-sg.com/libpst/ might be an idea too


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


More information about the dovecot mailing list