Bulk modify "Received" date on email headers

Hi All,

I recently migrated 4000 emails (Archive and Sent) from an Exchange Server (Outlook) to an IMAP provider (iCloud); however, iCloud’s web interface and Apple’s Mail app on iDevices sorts emails by “Received” date, instead of “Sent” date. During the migration, all the “received” dates were overwritten with the time of the migration.

This has messed everything up, but I read that this behaviour itself is normal. Is there an addon which can batch copy the “sent” date from all the emails to the “received” date in the email header? I found some addons which can do this, but only one email at a time.

I only need to do this once, so using an older version of Thunderbird is not a problem for me.

This forum is for discussions about developing add-ons, not for
end-user add-on questions. In the future you should go to
for end-user
support for add-ons.

Having said that…

  How did you migrate the emails from Outlook to iCloud? Did you

literally forward the emails to your iCloud account, which seems
unlikely, or did you connect both accounts to Outlook and drag and
drop the messages from the Exchange account to the IMAP account?
If the latter, then dragging and dropping would not add new
“Received” header lines to messages.

  If I'm correct, then the sort order that's being used is not

dates pulled from “Received” lines of messages, but rather most
likely the “order received” metadata stored on the IMAP server.
This cannot be modified by IMAP clients, so there’s no way a
Thunderbird add-on could change it. However, what I think you can
do, which won’t require an add-on at all, is the following:

  1. Add your iCloud IMAP account to Thunderbird.
  2.     In Thunderbird, sort the messages in ascending order (i.e.,
    

newest messages at the bottom) by date.

  1.     Create a new empty folder, select all the messages, and drag
    

them into the new folder.
I’m pretty sure that Thunderbird will move them into the new
folder in the order in which they were sorted when you dragged
them, which means that the “order received” field will reflect the
date order of the messages. You can test this out on a small
subset of the messages before moving all of them, i.e., move a
small subset in Thunderbird then check the Mail app or iCloud web
interface to make sure they’re sorted as expected, just to make
sure.

Regards,

Jonathan Kamens

Apologies, your post seems very helpful. I will follow the steps you listed and if I still have issues, will post on the right forum.