SMTP error 512 is not a standard SMTP reply code - it does not appear in RFC 5321's reply-code
table, and no major provider documents it. Material describing "SMTP error 512: bad destination
address" is almost always describing routing failures that real servers report with a different,
standard code: `550 5.4.4`, "unable to route."
What "512" actually means in practice: `550 5.4.4`. The enhanced code 5.4.4 is specifically
about routing - the destination's existence is not in question the way it is with 5.1.2 (bad
destination system address, covered separately); instead, no viable path to deliver the message
could be determined.
Why this condition happens
- **The destination's MX record points to a host with no working route from the sending
network** - the DNS record itself is valid, but the path to reach it is broken (a network
partition, an unreachable subnet, a misconfigured firewall on the path).
- A relay in the delivery chain cannot determine the next hop even though the final
destination's DNS resolves correctly - a routing table or relay configuration issue internal
to the mail infrastructure, not a DNS problem.
- Overloaded or malfunctioning server infrastructure on the receiving end causes it to
report that it cannot route internally to the mailbox store, even though externally its MX
record is perfectly valid.
- Network connectivity issues on the sending side - if your own outbound path to the
destination's MX is broken (a routing change, an ISP issue), your own relay may report this
back to the application layer as "unable to route," even though the problem is entirely on your
side.
The transcript
$ swaks --to test@mailpilots.in --server mx.example.net -> MAIL FROM:<sender@yourdomain.com> <- 250 2.1.0 OK -> RCPT TO:<test@mailpilots.in> <- 550 5.4.4 Unable to route
Unlike a DNS-resolution failure (553 5.1.2), the recipient's domain and MX record here resolve
without any problem - the failure is specifically about finding a network path to deliver the
message, which dig alone will never reveal.
How the big three word it
| Provider | Typical reply | Notes |
|---|---|---|
| Gmail / Google Workspace | Rarely surfaces this to end senders directly; Google's own infrastructure absorbs most internal routing issues before they reach an external SMTP reply | More commonly seen when *sending to* a smaller or self-hosted system with genuine routing issues, rather than from Gmail itself. |
| Microsoft 365 / Exchange Online | 550 5.4.4 SMTPSEND.DNS.NonExistentDomain or 550 5.4.4 Unable to route | Exchange Online's extended version of this code often names the specific routing sub-cause directly. |
| Self-hosted (Exim/Postfix relays) | 550 5.4.4 Unable to route | The literal, standard phrasing most commonly seen from relay systems. |
Diagnose it
$ dig +short MX example.net mx1.example.net. $ traceroute mx1.example.net traceroute to mx1.example.net (203.0.113.50), 30 hops max 1 gateway (192.168.1.1) 1.123 ms 2 * * * 3 * * *
If DNS resolves cleanly (confirming the address is not the problem, ruling out the 553 5.1.2
scenario) but a trace to the resolved host dies partway, you have confirmed this is a genuine
network-path issue rather than a DNS or addressing one.
The fix, in order
- Confirm the destination's MX resolves correctly first - if it does not, you actually have
a 553 5.1.2 condition, not this one, and the fix is different.
- Trace the network path to the resolved MX to confirm where connectivity actually breaks
down.
- If the break is on your own network path, work with your own ISP or network team; this is
not something the recipient can fix.
- If the break is clearly on the receiving side, retry after a reasonable interval, since
routing issues on infrastructure you do not control are often transient even when reported with
a permanent-looking 5xx.
- Contact the recipient through an alternative channel if the condition persists for more
than a day, since a sustained routing failure to a legitimate destination is unusual enough to
be worth reporting to them directly.
What not to do
- Do not search for "SMTP error 512" expecting an authoritative definition. None exists;
time spent searching for it is better spent confirming the actual 550 5.4.4 reply and its
real, documented cause.
- Do not treat this the same as a nonexistent-domain error.
5.4.4assumes the destination
system is real and known; the problem is reaching it, not finding it.
- Do not suppress the recipient's address. A routing failure says nothing about whether the
address itself is valid.
- Do not rewrite your own network configuration on a single occurrence. Confirm the pattern
is persistent, not a one-off network blip, before making any infrastructure change.
MailPilot surfaces the literal reply code behind every failed delivery attempt, so a routing
failure correctly reported as 550 5.4.4 is never flattened into a generic, unhelpfully vague
"undeliverable" label that would obscure what actually needs investigating.
Ready to reach the inbox every time?
Automated email warmup across real peer mailboxes. Live inbox placement monitoring. Free 7-day trial - no credit card required.
Start free trial