RFC2822 Message-ID corrupted on some email servers when using git send-email
- From
- windowsair <dev@airkyi.com>
- Date
- Apr 15, 2025, 14:39 UTC
- Message-ID
- <8771714B848C3A9F+9f64a309-ff70-466f-8d29-15950318b728@airkyi.com>
Hi there!
I am using `git send-email` to send emails and noticed a behavioral difference between different versions of Git. Since version v2.41.0, the Message-ID has been corrupted on my email provider exmail.qq.com.
The broken Message-ID may be like this:
Message-ID: <C627A112429DDE18+20250415123427.20834-3-dev@airkyi.com>
And in the early version, the normal Message-ID looks like this:
Message-ID: <20250415123238.17341-3-dev@airkyi.com>
It appears that the email server is overriding this field. And I finally found this commit:
647a2bb3ffc0("Merge branch 'jc/spell-id-in-both-caps-in-message-id'")This commit consistently spell "Message-ID" as such, not "Message-Id".
It seems that for my email server, using "Message-Id" results in the expected unmodified ID, while using the RFC2822-compliant "Message-ID" does not. So I want to document this here in case others encounter the same issue in the future :)
Best regards, windowsair