Fundamentals

How Email Verification Works: An SMTP Check, Line by Line

What happens when an email address is verified: the DNS lookup, a real SMTP conversation line by line, and what each mail server reply means.

By Hussam Abd 8 min read

Key takeaways

Email verification checks whether an address can receive mail without sending anything to it. A verifier confirms the address is well formed, looks up the domain's mail servers in DNS, then opens an SMTP conversation with one of those servers and asks whether it would accept mail for that exact mailbox. The server's reply, a three-digit code, is the evidence. When the reply proves nothing, which happens more often than most tools admit, the honest verdict is "unknown".

Most explanations stop at that list of steps. This one shows the actual conversation our engine has with a mail server, what each reply code means, and why the same question gets a straight answer from Gmail and a useless one from Outlook.com.

The four questions, cheapest first

A verifier asks its questions in order of cost, and stops at the first one that settles the matter. There is no point opening a network connection for an address that is missing its @.

  1. Is it well formed? One @, a local part and a domain within the length limits of RFC 5321. Checking this costs nothing. A near miss of a big provider, such as gmial.com, gets a correction here too. (Typos are common: we counted thousands of them in 1.47 million real addresses.)
  2. Is it a throwaway or a shared inbox? The domain is matched against lists of disposable mail services, and the local part against role names like info and support.
  3. Can the domain receive mail at all? A DNS lookup for the domain's MX records. No mail server and no fallback means no mailbox at that domain can exist.
  4. Does this mailbox exist? The SMTP check, below. It is the only step that says anything about the specific person, and the only one that can be wrong in both directions.

Questions 1 to 3 are cheap and deterministic. Every serious verifier gets them right. Accuracy is decided almost entirely by question 4.

A real SMTP check, line by line

Here is the conversation for an address at a company domain, with the names changed and trimmed to the lines that matter. Lines starting with > are what our engine sends; the rest is the receiving server.

220 mx.example-corp.com ESMTP ready
> EHLO verify.bounceshift.com
250-mx.example-corp.com Hello verify.bounceshift.com
250 SIZE 52428800
> MAIL FROM:<probe@verify.bounceshift.com>
250 2.1.0 Sender OK
> RCPT TO:<jane.doe@example-corp.com>
250 2.1.5 Recipient OK
> RCPT TO:<x7q2kd9w1v@example-corp.com>
550 5.1.1 User unknown
> QUIT
221 2.0.0 Bye

What each step is for:

What the server's reply means

The first digit of the reply carries most of the meaning: 2 is yes, 5 is a permanent no, 4 is "not now". The enhanced code after it (like 5.1.1) says what the no is about. This is how our engine maps the replies it sees.

Server replyWhat it meansVerdict
250, and the random address is rejectedThe mailbox existsvalid / smtp_verified
250 for the random address tooThe domain accepts everything, so nothing is provencatch_all, scored from the domain's delivery history
550 5.1.1 "user unknown"No such mailbox. A statement about the recipient.invalid / mailbox_not_found
550 5.7.x or 554 with "blocked", "spam", "policy"The server refuses us. A statement about the sender, not the address.unknown / smtp_blocked
450, 451, 452 or "greylisted"Greylisting: try again laterunknown / greylisted, retried automatically
4.2.2, or a 4xx that says "over quota" or "mailbox full"The mailbox exists but is full, so mail would bounce todayunknown / mailbox_full
No reply in timeA slow or overloaded serverunknown / timeout_exceeded

The row that catches tools out is the 5.7 one. A verifier that reads any 5xx as "invalid" will throw away real addresses whenever a server dislikes its IP address. A 5.1.1 is about the mailbox; a 5.7.1 is about the sender.

Why the same question gets different answers

Mail providers protect their users from address harvesting, and each does it differently. The result is that a verifier's accuracy depends heavily on which providers your list uses.

When delivery history beats the probe

A probe is a single question asked once. Real sending outcomes are better evidence. Customers who connect Mailgun, SendGrid, Postmark or Amazon SES send us the bounces, deliveries and complaints those services report, and we keep them as a record per address. The record holds a one-way hash of the address, never the address itself.

That history decides cases the probe can't. An address that has hard-bounced repeatedly comes back invalid / reputation_confirmed_invalid, even if its server says 250 to everything. An address on a catch-all domain that has received mail cleanly several times recently comes back graded on that history rather than as a coin toss. And history counts for less as it ages: a bounce from last week weighs more than one from last year.

"Unknown" is an answer

When a server greylists, times out, blocks the check, or accepts every address, the engine has no proof either way. It's tempting to return valid anyway, because it looks better in a report. We return unknown, with a sub-status saying which of those happened, and the credit is refunded. A false valid is the one result that turns into a hard bounce later, and hard bounces are what damage your sender reputation.

An unknown address isn't a bad address. Greylisted ones are re-checked automatically a few times over the following day, and many turn decisive. The rest are worth keeping in a separate segment and mailing carefully. Cleaning a list covers how to handle each status.

Every result carries the same three fields: a status (the verdict), a sub-status (the reason, like greylisted or mailbox_not_found) and a confidence score from 0 to 100. The status and error code reference lists all of them.

Try it on an address

The free email verifier runs the first three questions on any address without an account. The API quickstart shows how to run all four from your own signup form, with the full response. And if you're choosing between verifiers, the email verification services comparison sets ten of them side by side on price, free credits, credit expiry and the checks each one runs.

HA
Hussam Abd
Founder & Engineer

Hussam Abd is the founder and engineer behind BounceShift. He has been building software since 2013 — full-stack engineering, then founding and leading engineering teams, including CTO and founder roles at MSAAQ and product and front-end work on customer-support tooling at Hsoub. He built BounceShift to make email verification that is accurate and honest about what it cannot know.

Related

Keep reading

Check your list before you send it

Upload a CSV and get back the addresses that are safe to send. 100 free credits to start, no card, and no charge for the ones we can't verify.