Networking

How Email Verification Tools Work (and What They Can't Prove)

An email verification tool runs a series of checks on an address: syntax, whether the domain can receive mail, and often a conversation with the receiving mail server that stops before any message is sent. Each stage rules out a different kind of bad address, and none of them is as conclusive as a user clicking a confirmation link.

If you only want to check the format in your own code, see how to check if an email address is valid. This article covers what the hosted "email verification tool" services and scripts do beyond that, so you can judge what their results mean.

The checks, in the order tools usually run them

StageWhat the tool doesWhat a pass tells youWhat it cannot tell you
1. SyntaxParses the textIt looks like an addressThat anything exists
2. DomainLooks up MX records in DNSThe domain is set up to receive mailThat the mailbox exists
3. Mail server probeOpens an SMTP session and asks about the recipientThe server did not reject the recipientThat it will deliver, or that a person reads it
4. Lists and heuristicsCompares against disposable domains, role names, known typosThe address matches a known risk pattern or does notIntent of the person

Stage 2: the DNS lookup

A sending server finds where to deliver mail by asking DNS for the domain's MX records. RFC 5321, section 5.1, says that if the lookup returns an empty list, the address is treated as if it had an implicit MX record with a preference of 0, which means the domain's own address record is used. If MX records exist, address records are not used unless they are reached through those MX records, and if none of them is usable the situation must be reported as an error.

A verification tool applies the same logic. A domain with neither MX nor address records fails here, which catches typos that point at nothing. A mistyped domain that happens to be registered passes, because the DNS check only asks whether the domain can receive mail. You can run the lookup yourself:

nslookup -type=MX example.org

Stage 3: the SMTP probe

This is the step that sets a verification tool apart from a plain validator. The tool connects to a host from the MX list and starts a normal SMTP session, then stops before the message body is sent. In SMTP the RCPT TO command names a recipient, and RFC 5321, section 3.3, says that if the recipient is accepted the server returns 250 OK. For a recipient it knows to be undeliverable, it returns a 550 reply.

The exchange below is example output with placeholder hosts and addresses, not a capture from a real server. Lines starting with C: are sent by the tool, lines starting with S: come from the server:

S: 220 mx.example.org ESMTP ready
C: EHLO checker.example.net
S: 250 mx.example.org
C: MAIL FROM:<[email protected]>
S: 250 OK
C: RCPT TO:<[email protected]>
S: 250 OK
C: QUIT
S: 221 Bye

If the server had answered the RCPT TO line with a 550, the tool would mark the address as invalid. Because the session ends with QUIT and no DATA command, no email is delivered.

Why not use the VRFY command?

SMTP has a command made for this, VRFY. RFC 5321, section 3.5.3, says a server must not return a 250 code to VRFY unless it has actually verified the address, and that when an address looks valid but cannot be verified in real time, reply code 252 should be returned. Section 3.5.2 also allows implementations to let local installations disable the command for security reasons. In practice that means VRFY is often turned off or answered with a non-committal reply, so tools fall back on RCPT TO.

Why probe results are often "unknown" or "risky"

The probe only works if the server answers honestly at the RCPT TO stage. Several things get in the way:

  • Late checking. RFC 5321, section 3.3, notes that some servers do not perform recipient verification until after the message text is received. Such a server may say 250 OK to every address and bounce the bad ones afterwards. A tool that stops before DATA never sees that bounce, so it reports a valid address that is not.
  • Accept-all domains. Some domains are configured to accept mail for any local part. Tools commonly label these "catch-all" or "risky", because the server's yes does not distinguish a real mailbox from a made-up one.
  • Temporary failures. A 4yz reply means, per section 4.2.1, that the error condition is temporary and the action may be requested again. A server can use this to turn away a first-time sender. The tool cannot call this a yes or a no, so it reports "unknown" or retries later.
  • Blocked probes. A provider may refuse connections from addresses that open many sessions without sending mail. The result is a timeout, not an answer.

The practical rule: treat a 550 rejection as strong evidence the address is bad, and treat a 250 as weak evidence the address is good.

Stage 4: lists and heuristics

After the network checks, many tools add rules that need no connection:

  • Disposable domains. OWASP notes that disposable email services can be used to bypass controls. Its advice is to maintain a list of known disposable domains if appropriate, and to prefer risk-based controls over strict blocking.
  • Role addresses such as info@ or admin@, which reach a group instead of a person.
  • Likely typos in popular domain names, which the tool can suggest correcting.

These are judgments from a list, not facts about the specific mailbox, so a good tool shows them as separate flags and not as a single pass or fail.

When a verification tool is the wrong choice

For sign-ups, a verification tool is the weaker option. OWASP's guidance is to send a message and verify with a token: use cryptographically secure, random tokens, make them single-use and time-limited, and do not activate the account before verification is completed. That proves the user can read the mailbox, which no probe can show. It also avoids contacting third-party mail servers on your users' behalf.

A verification service earns its place in a different job: cleaning an existing list before a first mailing, where sending a confirmation to every row is not an option. In that case:

  1. Remove addresses that fail syntax or have no usable domain.
  2. Remove addresses the server rejected with a 550.
  3. Send to "unknown" and "catch-all" addresses with caution, in a small batch, and watch the bounces.

Privacy and safety of uploading a list

Using a hosted service means giving a third party every address on your list, along with the fact that you are checking it. Read the service's data retention and processing terms first. Do not upload addresses you have no right to process. If you do not need a service, the DNS and SMTP stages above can be run by a developer with a short script, but follow the caution in the FAQ about throttling and blocking.

If a tool marks a real address as invalid

  • Check the syntax stage first. A strict pattern may reject valid addresses with a + tag or a long top-level domain.
  • Check the domain's MX records with the nslookup command above. A freshly set up domain may not have published them yet.
  • Retry later. If the server returned a 4yz reply, the status is temporary and may change.
  • Send a real message. If it bounces, the bounce notice states the reason. If it does not, the tool's verdict was wrong.

Frequently asked questions

Can an email verification tool tell for certain that a mailbox exists?
Not for every address. A tool can only ask the receiving mail server, and RFC 5321 lets a server answer with a 252 reply (cannot verify) or accept every recipient and decide later. A confirmation message that the user acts on is the only certain proof.
Why does a verification tool sometimes return 'unknown' or 'risky'?
Those labels usually mean the server did not give a clear answer. It may accept all recipients, block the probe, or return a temporary 4yz error. RFC 5321 says a 4yz reply means the condition is temporary and the action may be requested again, so a tool cannot treat it as a yes or a no.
Is it safe to run my own SMTP probe against someone else's server?
Probing many addresses can look like address harvesting, and servers may block or throttle your IP address. Check the terms of any mail provider before probing it, and do not run bulk probes from a network you depend on for sending real mail.
Do I need a paid verification service to validate sign-ups?
Not to prove ownership. Sending a single-use, time-limited link to the address, as OWASP recommends, proves the user can read that mailbox. Paid tools are mainly useful for cleaning an existing list before a first send.

Sources