SMTP
SMTP Error 540 isn't a standard RFC 5321 code. Learn what it actually means (enhanced status 5.4.0 or a provider rejection like Rambler) and how to fix the bounce.
Updated Jul 1, 2026
The short answer
"SMTP Error 540" is not a standard SMTP reply code — RFC 5321 defines no 540 basic code. In practice it's either a misread enhanced status code 5.4.0 ("other/undefined network or routing failure," RFC 3463) or a provider-specific permanent rejection (e.g., Rambler returns "540 recipient address rejected: Inactive/Blocked"). Treat it as a 5xx permanent bounce: verify the recipient address, then check why the receiving server is blocking you.
Not in the standard sense. RFC 5321 §4.2.1 defines the SMTP reply-code registry, and 540 is not one of the defined three-digit basic reply codes — the permanent (5yz) codes that exist are 500–504, 521/523/524, 530–538, 550–557, etc. (Wikipedia's RFC 5321 list has no 540 entry.) So when you see "540," it is almost always one of two things:
5.4.0. Under RFC 3463 §3.5, X.4.0 means "Other or undefined network or routing status" — "something went wrong with networking, but it is not clear what the problem is." The leading 5 makes it permanent. Stripping the dots turns 5.4.0 into the "540" some tools and logs display.540 rejection. Some mail servers reuse the number for a permanent recipient rejection. For example, SMTP Field Manual documents Rambler returning 540 recipient address rejected: Inactive or ... Blocked — i.e., a suspended/deactivated mailbox or a sender that's been blocked.Either way, the leading 5 tells you this is a permanent failure — do not blindly retry (RFC 5321 §4.2.1).
Because the code is non-standard, read the full bounce text — the human-readable part after the number is the real diagnostic. Then work through these in order:
5.4.0 (network/routing) sometimes masks a transient routing problem on the receiving side. If the wording is vague, you can retry once after a delay; if it persists, treat it as permanent and stop.540 ... Inactive / Blocked (e.g., Rambler) — Most likely meaning: Recipient mailbox suspended/deactivated or sender blocked; Action: Verify/remove address; check sender reputation5.4.0 — Most likely meaning: RFC 3463 "other/undefined network or routing" failure; Action: Inspect routing/DNS; retry once, then treat as permanentNote: RFC 5321 §4.2.1 actually discourages servers from inventing new reply codes rather than reusing the ones already defined — but in practice, some legacy or non-compliant mail systems assign their own meanings to unused numbers like 540 anyway, which is why the code isn't reliable across providers. Always trust the accompanying text over the bare number.
References
FAQ
No. RFC 5321 does not define 540 as a basic SMTP reply code. It is usually either a misread enhanced status code 5.4.0 (RFC 3463, "other or undefined network or routing status") or a provider-specific literal rejection, such as Rambler's "540 recipient address rejected: Inactive/Blocked."
One API, every provider
Courier connects to your email, SMS, and push providers, handles retries and failover, and surfaces delivery errors in plain language.
Reply-code definitions per RFC 5321 §4.2.1; RFC 3463 §3.5 (X.4.0). Last reviewed Jul 1, 2026. Courier is not affiliated with third-party providers; error behavior may vary by implementation.
© 2026 Courier. All rights reserved.