[Dovecot] Does a script exist to fix broken maildir timestamps?

drbob drbob at gmx.co.uk
Sat Apr 26 05:22:03 EEST 2008


Hello,

When I upgraded to dovecot (changing servers at the same time) in 
November last year I copied the maildirs from my old server without
using the -p option to preserve timestamps! Since my mail client
displays the email dates based on the Date header rather than the imap
"internaldate" I didn't notice the problem until today when I tried to 
migrate an account to gmail using imapsync and found that all emails 
prior to November display the wrong date in the web interface (they show 
the date they were copied in November). I feel very silly.

Before I go try to hack together a script which parses all my older
email files and changes the timestamps to the time recorded in the
"Date:" header, does anyone know if robust, tested version of such a
script is alrady available? Would correcting the timestamps in this way 
cause any problems for dovecot (e.g in the index files)?

Thanks in advance for any help.

drbob

NB In my googling for a solution to this problem I found this hack to
imapsync which would rewrite the "internaldate" based on the date header
during a sync. Whilst I'd rather fix the timestamps that are the source
of the problem, it may be useful for others finding this post in the
future, see:
http://www.zimbra.com/forums/installation/237-received-date-appears-incorrect-imported-mail.html



More information about the dovecot mailing list