Every once in a while we’ll see a rejection from Yahoo that says
RFCs 554 5.0.0 Message not accepted due to failed RFC compliance. What does that mean and what can we do about it?
It really does mean exactly what it says on the label: there’s something about the message that is not in compliance with any number of RFCs and are not going to accept the message in its current state. When trying to help a colleague diagnose the issue I came up with a list of things to check.
Troubleshooting in the email
- Is there any high ASCII without quoted printable or Base64 encoding in the body or the headers?
- Is there a Date header?
- Is there any duplication in header fields?
- Is there a bare IP address in a link somewhere?
- Are the line lengths inside the message shorter than 998 characters?
- Are lines correctly terminated with CR/LF?
- Is the DKIM signature field correct?
- Is the MIME type correct?
Troubleshooting outside the email
- Is the sending domain configured for DNSSec? Did something break?
- Is DKIM, SPF and DMARC correct or did a DNS update get pushed and break something?
- Does the SPF domain have a MX and is it answering on port 25?
- Does the From domain have a MX and is it answering on port 25?
- Is there a problem with TLS negotiation?
- Is there a network problem somewhere preventing DNS lookups from happening?
There are so many different technical ratholes to go down when troubleshooting technical errors, but this gives people a place to start with issue. The most common problems I see are:
- Line lengths too long or incorrectly terminated. Yahoo isn’t the only receiver to refuse mail for this problem.
- Header duplication. There are some headers that cannot and should not show up more than once in a message and sometimes there are duplications that happen.
- Lack of a Date header. I’ve seen this in mail coming in here just recently.
Overall, most receivers are fairly liberal in what they receive and don’t reject mail simply because it’s not fully in compliance with the RFCs. Some, like Yahoo, are much pickier about the standards.
The underlying solution is the same: fix whatever it is that’s broken and resend the messages.
Edit: After this was posted a representative of Yahoo contacted me to let me know that their requirements for RFC compliance were to address some types of exploits they’ve seen in the past.