threads / discuss / 63298

RFC2822 Message-ID corrupted on some email servers when using git send-email

Subject: RFC2822 Message-ID corrupted on some email servers when using git send-email

## tl;dr

One message between Apr 15, 2025 and Apr 15, 2025.

replies: 0people: 1as markdown or json

windowsair· Apr 15, 2025, 14:39 UTC · lore
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

← back to recent threads