Open shadowkrusha opened 8 years ago
I don't currently have a good solution for this.
There are many ways that a message can be malformed, some of which cause the Gmail API to reject the message. A missing message ID is one, but so is an invalid From:
header. I'm sure that there are others, too, that I just haven't run into yet. Because of that, I'm loathe to try to generate message IDs or fix From
fields inside Mail Importer itself.
Instead, my plan is to move messages like these to a new mbox
format file so that they can be edited by hand and retried. If, however, more people have the missing message ID problem, I could be convinced that automating the fix is worthwhile—especially because Mail Importer depends on messages having unique IDs in order to resume aborted imports.
For now, my suggestion would be to edit that message by hand and add a local message ID. You can consult RFC 5322 to see how they suggest generating message IDs. If you want it to be stable, then using the date and subject is probably a reasonable starting point. It looks like your message, though, doesn't have a Date:
header, either, though.
shadowkrusha, How did you solve this problem?
is it resolved ?
Not really. My suggestion is just to edit the original message. I haven't had the time to really make the mail importer better recently, so all of my aspirations from 2016 remain that.
I'm trying to import some folders from thunderbird and run into issues where the messageid header is missing from the mail.
This results in a null pointer exception:
Here is an example of a message with the issues:
Thoughts on how to re-generate messageid's? I was thinking about some sort of MD5/BASE64 hash based on date/from/to?