Fix imapsync Migration Dates in Outlook
Why imapsync Migrations Show the Wrong Date in Outlook
imapsync is an open-source command-line tool popular among system administrators for server-to-server IMAP mailbox synchronization. imapsync includes a --syncinternaldates flag designed to preserve the original INTERNALDATE during migration. However, even when this flag is used, the destination mail server adds its own Received header to each uploaded message, and this header carries the migration timestamp.
Outlook does not rely solely on INTERNALDATE for date display. Outlook's "Received" column is derived from the topmost Received header in the email. Even if imapsync successfully preserved the INTERNALDATE using --syncinternaldates, the new Received header added by the destination server overrides the date that Outlook displays. Administrators who believed they had protected the dates by using the correct imapsync flags discover that Outlook still shows the wrong date.
This behavior catches many experienced administrators by surprise. The imapsync documentation focuses on INTERNALDATE preservation, leading administrators to assume that --syncinternaldates is sufficient. In practice, the Received header issue is a separate problem that --syncinternaldates does not address, because the Received header is added by the destination server after imapsync completes its upload, outside of imapsync's control.
How This Affects Outlook
After an imapsync migration, Outlook displays the migration date in the "Received" column for every email. Even when --syncinternaldates was used and the IMAP INTERNALDATE is technically correct on the server, Outlook parses the Received headers and displays the topmost one, which is the migration timestamp. The result is a mailbox where every email appears to have arrived on the same day.
The frustration is compounded because administrators can verify on the IMAP server that the INTERNALDATE is correct, yet Outlook still shows the wrong date. This leads to hours of troubleshooting on the Outlook side (reinstalling profiles, clearing caches, rebuilding OST files) that never resolve the issue because the root cause is in the email headers, not in Outlook's local configuration. The only fix is to remove the migration Received header from each email at the server level.
Frequently Asked Questions
I used imapsync --syncinternaldates but Outlook still shows the wrong date. Why?
The --syncinternaldates flag preserves the IMAP INTERNALDATE on the server, but it cannot prevent the destination server from adding a new Received header. Outlook reads the topmost Received header for its date display, which contains the migration timestamp. The INTERNALDATE and the Received header are two separate date sources.
Can I fix imapsync dates by editing the Received headers manually?
Technically, you would need to download each email, edit the headers, delete the original, and re-upload with the correct INTERNALDATE. For anything more than a handful of emails, this is impractical. Redate.io automates this entire process with built-in verification.
Does Redate.io work with any IMAP server used with imapsync?
Yes. Redate.io supports any standard IMAP server. Whether the destination was Dovecot, Courier, Exchange, or any other IMAP-compatible server, Redate.io can connect and fix the dates.