Comment by cromka
7 hours ago
I am in the process of migrating from GMail and Proton using imapsync, since Proton's built-in tool imported some 95% of emails only.
Turns out Proton is super picky about RFC compliance and will reject anything that doesn't met the criteria, which sucks because GMail does exactly the opposite and will take almost anything you throw at it.
So I have so far written about 7 different regexes to fix some specific mailer issues to make them RFC compliant, with plenty more to go. And even then it still somewhat sucks because I am, effectively, modifying the emails to a state they were not received/sent in.
I also had that issue when setting up a server. I decided to disable the enforcement for the initial sync and then enable it.
Email only has two really mandatory headers: Date and From. There were emails without a Date header, you can't make that shit up. Naturally MUAs also can't deal with this, e.g. Thunderbird shows the timestamp of the first sync.