552 5.3.4: header name too long
Gmail rejected the message because the name of one of its header fields is longer than Google allows.
- Gmail
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 552 5.3.4
- Provider
- Gmail and Google Workspace
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- The sender. The fix is on the sending side: your domain, your server or your list.
- What the server says
552 5.3.4 The size of a header name…exceeds Google's header name limit…
What it means
A header field has a name, such as Subject or X-Mailer, and a value. Gmail limits the length of the name on its own, and the bounce gives the size of the name it found and Google's limit. Ordinary software never comes close, so this points to a bug: a value written into the name, a missing colon that runs name and value together, or a broken line that reads as one very long name. Fix the software that builds the headers, then send again.
Common causes
- Sending code that builds headers by hand and leaves out the colon.
- A header line broken in the wrong place.
- Data written into a custom header name instead of its value.
How to fix it
- 01Look at the raw headers of a sent message to find the malformed line.
- 02Fix the code or template so that each header is written as Name: value.
- 03Use your mail library's own functions to add headers instead of writing raw lines.
- 04Resend once the headers are fixed.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- Gmail SMTP errors and codes (Google Workspace Admin Help)knowledge.workspace.google.com
Related codes
- 552 5.3.4A single header is too large.Gmail rejected the message because one of its header fields holds a value longer than Google allows for a single header.
- 552Storage allocation exceeded.The receiving server aborted the message because it exceeded a storage limit, usually a full mailbox or a message larger than allowed.
- 5.3.4Message too big.The message is larger than the maximum size the receiving system accepts for any message, so it was refused and has to be made smaller.
5.3.4 at other providers
Further reading
All 108 Gmail codesEvery code in the wikiPaste your own bounce