mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 02:28:15 +03:00

With that recent change, we would keep track of Content-* headers of parsed messages. We could ask admins to run a command to reparse messages for all accounts. But instead we just do it automatically when opening the account. We keep track whether we did the upgrade. And we do it in the background. Those recent changes were to add optional fields to the IMAP fetch "bodystructure" responses. There is a small chance that an IMAP client requests these fields before they are properly populated with the reparse (only existing messages, new incoming messages are parsed with the new code). We could try to detect whether the upgrade has completed, and chance IMAP behaviour based on that. But the complexity and long-term maintenance burden doesn't seem worth it. Worst case, we'll temporarily claim some relatively unimportant headers aren't present on a message. Most email clients won't even look at those fields, but will parse them message themselves instead.