SMTP
"SMTP Error 513" isn't a real RFC 5321 code — vendors disagree on its meaning (bad address syntax vs. failed SMTP auth). Here's how to tell which applies.
Updated Jul 1, 2026
The short answer
"SMTP Error 513" is not a real RFC 5321 reply code; it is a non-standard vendor label that different platforms map to different causes. Some (KnownHost) treat it as a bad recipient-address syntax rejection (X.1.3, usually seen as 501 5.1.3 or 553 5.1.3); others (AuthSMTP, SendLayer) define it as an SMTP-AUTH or relay-authorization failure. Check your platform's error table and the full bounce text, then fix the matching cause: correct the malformed RCPT TO address, or fix authentication.
Not as a reply code. RFC 5321 §4.2.3 enumerates the valid SMTP reply codes, and 513 is not one of them. The permanent-failure (5xx) replies it lists are 500, 501, 502, 503, and 504, plus 550, 551, 552, 553, and 554 (with 521 and 556 added later by RFC 7504). There is no 513 — and no 5xx code between 504 and 550 in the base SMTP spec.
Where the "513" label comes from is the enhanced status code class X.1.3 defined in RFC 3463 §3.2: "The destination address was syntactically invalid." Some host control panels and legacy error tables (for example KnownHost's table, which lists 513 as "Address type is incorrect (possibly misspelled)") collapse the 5.1.3 triplet into "513." So when you see "513" on one of these platforms, the server may be returning a real reply such as:
501 5.1.3 Bad recipient address syntax553 5.1.3 The recipient address is not a valid RFC-5321 address550 5.1.3 The destination address was syntactically invalidCaveat: because "513" has no basis in any standard, different vendors' legacy error tables assign the number to different underlying causes. KnownHost's table maps it to bad address syntax (the interpretation this page focuses on), but AuthSMTP's error-code table defines 513 as "must authenticate before sending" (an SMTP-AUTH/relay-authorization failure), and SendLayer documents 513 as "Relaying denied" for the same reason — neither related to address syntax. Don't assume address syntax is the cause just because you saw "513"; check your specific mail platform's own error table and, more importantly, read the full bounce text your server actually returned.
All three address-syntax variants mean the same thing: the address you put in the RCPT TO: (or MAIL FROM:) command does not parse as a legal mailbox per RFC 5321 §4.1.2. This is a syntax rejection — the server is not saying the mailbox doesn't exist (that's 5.1.1); it's saying it can't even read the address. If your platform's table instead maps "513" to an authentication/relay failure, the fix is different: verify SMTP-AUTH credentials and confirm your sending IP or account is authorized to relay through that server.
john @example.com). A single extra space invalidates the address.@, or a missing domain (john@, john, john@@example.com).RCPT TO:john@example.com without <>, or <John Doe john@example.com> where the display name leaked into the address.RCPT TO:<> or an unresolved placeholder like {{email}}.501 5.1.3 Bad recipient address syntax, etc.) and the offending address tell you exactly which address failed — and whether you're even looking at an address-syntax issue versus an auth/relay issue.RCPT TO:// Nodemailer example: trim and sanity-check before sendingconst to = rawTo.trim();if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(to)) {throw new Error(`Recipient failed RFC 5321 syntax check: ${JSON.stringify(rawTo)}`);}
# Python: catch empty/placeholder values before they reach RCPT TOto = raw_to.strip()if not to or "@" not in to:raise ValueError(f"Invalid recipient address: {raw_to!r}")
RCPT TO:<...> must be enclosed in angle brackets with no display name, e.g. RCPT TO:<john@example.com>. Keep display names in the message headers (To:), not the envelope.Note:
5.1.3is a permanent failure (5.x.x) — retrying the same address will not help. You must correct the address. If the address is genuinely valid and still rejected, the receiving server may be applying a stricter-than-RFC interpretation; contact the recipient's mail administrator or your sending provider.
Because Courier delivers through downstream email providers (SendGrid, SES, Postmark, etc.), a 5.1.3 rejection surfaces as a bounce/undeliverable on that provider — fix the recipient address in your send payload and resend.
References
FAQ
No. RFC 5321 §4.2.3 lists every valid reply code and 513 is not among them. 'SMTP Error 513' is a non-standard control-panel/legacy label, and different vendors map it to different things: some tables (like KnownHost's) tie it to the X.1.3 enhanced status code (RFC 3463, 'Bad destination mailbox address syntax'), appearing in real replies like 501 5.1.3 or 553 5.1.3, while others (AuthSMTP, SendLayer) define 513 as an SMTP-AUTH/relay-authorization failure instead. Always check your specific platform's table and the full bounce text rather than assuming one meaning.
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 3463 §3.2 (X.1.3); RFC 5321 §4.2.3. Last reviewed Jul 1, 2026. Courier is not affiliated with third-party providers; error behavior may vary by implementation.
© 2026 Courier. All rights reserved.