Yahoo and AOL message-format error
Yahoo 554: Headers are not RFC compliant
Yahoo rejected the message because its headers or MIME structure are malformed. Fix the application or gateway that created the message, not SPF, DKIM, or DMARC DNS.
554 Message not accepted: headers are not RFC compliant
A 554 response is permanent. Create a corrected message before sending again.
What to inspect
- Missing, duplicate, or malformed From, Date, and Message-ID headers.
- Invalid addresses, line endings, or header folding.
- Broken MIME types, boundaries, charsets, or encodings.
- A relay that rewrites the raw message incorrectly.
How to fix it
- Capture the raw message before submission.
- Validate it with a standards-aware email parser.
- Fix or upgrade the library that generates it.
- Compare the message before and after each relay.
- Send a minimal valid test, then add features back one at a time.
Frequently asked questions
What does a Yahoo RFC compliance failure mean?
Yahoo found a malformed header, MIME type, or other message-format condition that does not meet Internet message standards.
Can SPF repair malformed headers?
No. The application or gateway generating or rewriting the message must be corrected.
What should I validate?
Validate the raw message’s required and singleton headers, address syntax, line folding, MIME types, boundaries, and transfer encodings.
Related email diagnostics
Yahoo 554 Message not allowedResolve Yahoo 554 Message not allowed by using the full response to distinguish authentication, content, reputation, and sender-policy causes.
Gmail 554 5.6.0: Email message is malformed. Not acceptedFix Gmail 554 5.6.0 by validating RFC message structure, headers, MIME boundaries, and the software generating email.
Outlook 550 5.7.512: Access denied, message must be RFC 5322 section 3.6.2 compliantFix Microsoft 365 550 5.7.512 when a message lacks a valid RFC 5322 From address.
Primary sources: Yahoo Sender Hub SMTP Error Codes, RFC 5321 SMTP, RFC 5322 Internet Message Format.