Fixing modification dates in imported mail archives

I’ve recently consolidated my 25+ years of email archives into DEVONthink Pro. The only issue I’m facing is that the Thunderbird import did not work as expected. All mail have been imported but the modification date has been set to the import date, not to the date within the mail.

I’ve been scouring this forum and the scripts libraries to see if there was a handy applescript that could run through these emails, detect that the mail-date is different from the DTP-modification date and then update the modification date to the mail-date.

Does anyone know if such a script exists? If not, any gotchas I might want to be aware of before trying to create such a script?

What’s the creation date set to?

Smart! The created date is set to the date in the email header, the modified date is the time of import.

In the regular DTP email import the created and modified dates are much more similar - it hadn’t occurred to me to check the created date.


Is there an easy script to update the modified date to the created date to maintain consistency between views?