554 5.6.0: malformed message
Gmail refused the message because its structure breaks the Internet Message Format rules of RFC 5322, so it cannot be read reliably.
- Gmail
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 554 5.6.0
- 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
554 5.6.0 Email message is malformed. Not accepted.
What it means
The message itself, its headers or its MIME structure, does not follow RFC 5322 closely enough for Gmail to accept it. Google gives no detail beyond pointing to its sender guidelines, which require all senders to format messages according to RFC 5322, and to the RFC itself. Broken MIME boundaries, invalid header lines, bare line feeds and messages cut off in transit are typical causes. Mail built by a standard library rarely triggers it; handmade or heavily altered messages do.
Common causes
- Broken MIME structure, such as missing or mismatched boundaries.
- Header lines that do not follow the Name: value format.
- Line endings that are not CRLF, or a message cut off in transit.
- A gateway or filter that damaged the message while changing it.
How to fix it
- 01Save the raw message as sent and check its headers and MIME parts with a header analyzer or validator.
- 02Build messages with a maintained mail library instead of by hand.
- 03Turn off any gateway step that rewrites the message, then test again.
- 04Resend once the message passes validation.
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
- Email sender guidelines (Gmail Help)support.google.com
Related codes
- 550 5.7.1Malformed header.Gmail rejected the message because one of its header lines is malformed under RFC 5322; the bounce names which header it is.
- 554Transaction failed.The server permanently refused the transaction, often after receiving the message data or straight away when the connection opened.
- 5.6.0Message content problem, unspecified.Something about the content of the message made it undeliverable, and the server did not say exactly what.
5.6.0 at other providers
- 554 5.6.0Attachment scan timed out under a transport rule.A Word or Excel attachment could not be scanned in time by a transport rule set to defer on failure, so the message was returned.
- 550 5.6.0Moderation fails without an expiry policy tag.A message to a moderated group failed because the approval agent needs a retention tag that the organization has not created.
Further reading
All 108 Gmail codesEvery code in the wikiPaste your own bounce