I originally saw this on the mailop list, but was also posted on Reddit. Excerpts below:
If you’re struggling with Gmail inbox placement despite clean headers and good reputation, your ESP might be sabotaging your messages without your knowledge. SendGrid’s SMTP relay violates RFC 2047 and RFC 2369 by MIME-encoding the List-Unsubscribe header as soon as its value exceeds 77 bytes. This breaks unsubscribe links in Gmail and Outlook. The issue has been confirmed internally but remains unresolved. SendGrid sends over 100 billion emails per month - this is a massive standards compliance failure with real-world consequences for deliverability and compliance.
…
As long as this header is 77 bytes or fewer, SendGrid relays it unchanged. But when the value reaches 78 bytes, their SMTP relay forcibly rewrites it using MIME encoded-word syntax (RFC 2047). That encoding is explicitly forbidden in structured headers like List-Unsubscribe.
Here is what SendGrid sends instead:
List-Unsubscribe: =?us-ascii?Q?=3Chttps=3A=2F=2Fwww=2Eexample=2Ecom=2Funsubscribe=2F=3E=2C=3Cmailto=3Aunsubscribe=40opt?= =?us-ascii?Q?out=2Eexample=2Ecom=3E?=This encoding breaks unsubscribe link parsing in both Gmail and Outlook. As a result, recipients cannot easily unsubscribe via UI elements, which can lead to higher complaint rates and lower inbox placement. Worse, Gmail’s “Show original” view decodes the header, so one can initially be unaware of the rewriting.
This behavior violates:
RFC 2047, which prohibits encoded-words in structured headers like List-Unsubscribe.
RFC 2369, which defines the syntax and structure of the List-Unsubscribe header and assumes parsability in plain ASCII.
An example of a list-unsubscribe header that Discourse sends is:
List-Unsubscribe: <https://meta.discourse.org/email/unsubscribe/abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl>
There’s 64 characters in the unique token alone, so it’s guaranteed the unsubscribe links we send out will be over 77 characters.
We do not use SendGrid but I know that a lot of our self-hosters do, so I think it’s important to make everyone here aware of this.
Are there any SendGrid users here that can confirm this behaviour?
