SMTP error 512
Domain not found — a vendor label for enhanced status 5.1.2.
Updated Jul 1, 2026
SMTP 512 is not a real SMTP reply code. It is an informal label used across hosting and ESP support docs for enhanced status 5.1.2, "bad destination system address" (RFC 3463): the recipient domain after the @ cannot be resolved or has no mail server. Fix it by correcting a domain typo or repairing the recipient domain MX and DNS records.
Fix the domain typo or the recipient domain MX / DNS records.
What it means
There is no 512 reply code in SMTP. Per RFC 5321 section 4.2, every reply is a three-digit code, and per section 4.2.1 the second digit classifies it: x0z syntax, x1z informational, x2z connections, x5z mail system. There is no registered 5 1 2 reply, and you will never see a literal 512 in a raw transcript or bounce header. "Error 512" is an informal label used by SendLayer, KnownHost, and others for what the mail system actually returned, the enhanced status 5.1.2. Under RFC 3463 section 3.2, X.1.2 means the destination system in the address does not exist or cannot accept mail, so the part to the right of the @ is invalid for mail. On the wire it usually arrives as 550 5.1.2 (permanent), or, while DNS is flapping, a transient 4xx such as 451 4.4.7 or 450 4.1.2.
Common causes
Names like gmial.com, domain.coom, or outlok.com. The domain simply does not exist in DNS.
It resolves but advertises no mail server. This is distinct from X.1.1, which is a bad mailbox on the left of the @.
The recipient domain lapsed or was never registered.
Your sending server or its resolver cannot reach the recipient domain nameservers. When this is transient it should be reported in the 4.x.x class, not 5.x.x.
How to fix it
- Check the recipient domain for typos first
This is the most common cause. Verify the spelling of everything after the @.
- Confirm the recipient domain has a mail server
Look up its MX records with "dig MX recipient-domain.com +short" or "nslookup -type=MX recipient-domain.com". If nothing returns, the domain cannot receive mail. If it resolves but publishes zero MX records, RFC 5321 section 5.1 treats it as having an implicit MX at its own name, so senders still try its A or AAAA record. That fallback does not apply when the domain name itself fails to resolve (NXDOMAIN), which is a hard error. MXToolbox or DNS Checker give the same answer in a browser. If the recipient domain is misconfigured, only its administrator can fix it.
- If many recipients across different domains fail, suspect your own resolver
A 512 or 5.1.2 (or a transient 4.1.2 or 4.4.7) on every send usually means your host cannot resolve DNS at all. Verify it can reach a working resolver with "dig MX gmail.com +short", which should return Google MX hosts. If that fails too, fix the sending server resolv.conf, firewall egress on UDP and TCP port 53, or upstream DNS, not the recipient.
Paired code
A real bounce often shows both a 3-digit code and an enhanced code together. This one commonly pairs with:
Common questions
Is SMTP error 512 a real SMTP reply code?
No. RFC 5321 defines no 512 reply code, and you will not see a literal 512 in a raw transcript. It is an informal label used across hosting and ESP docs for enhanced status 5.1.2 (RFC 3463), meaning the recipient domain could not be resolved or accepts no mail.
What is the difference between 5.1.2 and 5.1.1?
5.1.2 is a domain problem: the part to the right of the @ cannot be resolved or has no mail server. 5.1.1 is a mailbox problem: the domain is fine but the local part to the left of the @ has no account.
Why do all my emails suddenly return a 512 or 5.1.2 error?
When every domain fails, the fault is usually your own resolver rather than the recipients. Confirm the sending host can resolve a known-good domain such as gmail.com, then fix resolv.conf, port 53 egress, or upstream DNS.