1. "Valid" means three things
Asking whether an email address is valid really means asking three different questions:
- Is the address written correctly? That is about syntax: the
@sign, allowed characters, length. - Can the domain receive mail? That is about DNS: does the domain exist and does it have a mail server.
- Does this specific mailbox exist? Only the recipient's mail server can answer that.
The address [email protected] can have perfect syntax, and company.com can have working MX records, and still there may be no john.smith mailbox. That is why reliable verification goes through all three levels and states plainly what it learned at each one.
2. Syntax: a regular expression is only the start
The formal rules for writing an address are set out in RFC 5321 and RFC 5322. They are more permissive than most people think: they allow quoted local parts and characters such as +, ! and #. Expressing the whole RFC in one regular expression is unreadable and, in practice, unnecessary.
In a form, a simple and deliberately loose filter is enough to catch obvious mistakes (no @, spaces, no dot in the domain):
^[^\s@]+@[^\s@]+\.[^\s@]+$Real syntax validation happens later and also checks things a regular expression cannot see:
- the local part (before the
@) has at most 64 characters, the whole address at most 254; - the domain is made of valid labels (no double dots, no hyphen at the start or end of a label);
- domains with non-ASCII characters (e.g.
müller.de) are converted to ASCII (punycode), because that is the only form DNS understands; - plus addresses (
[email protected]) are valid and should not be rejected.
Do not "fix" the address for the user
Removing dots or the part after the plus only works with some providers (Gmail, for example). Elsewhere it is a completely different mailbox. Verification may suggest a correction, but it should never silently change the address.
3. Domain and DNS: does anyone receive mail here?
Once the syntax is fine, we look the domain up in DNS:
- Does the domain exist? An
NXDOMAINanswer means there is no such domain, so the address is invalid. - MX records point to the servers that accept mail for the domain. Their presence is the strongest signal DNS can give.
- No MX does not always mean no mail. Under RFC 5321 the sending server may then deliver to the domain's A or AAAA record (the so-called implicit MX). It is rare, but valid.
- Null MX (
MX 0 ., RFC 7505) is an explicit statement that "this domain does not accept mail". An address in such a domain is invalid.
$ dig +short MX company.com
10 mx1.company.com.
20 mx2.company.com.An important distinction: a DNS timeout or a DNS server failure (SERVFAIL) does not mean the address is bad. It is a temporary problem. We mark such a result as undecided, and it is worth checking again rather than removing the address from your list.
4. Risk signals: valid, but doubtful
Some addresses pass syntax and DNS and still do not belong in a contact list:
- Disposable domains give out a mailbox for a few minutes or hours. Signing up with one usually means someone does not want to hear from you.
- Typos in the domain, such as
gmial.cominstead ofgmail.comorhotmail.coninstead ofhotmail.com. The best moment to suggest a correction is while the user is still in the form. - Role-based addresses, such as
office@,contact@,info@. They are valid and often needed in B2B, but several people read them, or nobody does, so marketing campaigns treat them with more care.
5. SMTP: asking about the specific mailbox
The only way to learn anything about the mailbox itself without sending a message is to start a conversation with the recipient's mail server and stop it before the content:
EHLO probe.example
MAIL FROM:<verify@example>
RCPT TO:<[email protected]>
550 5.1.1 User unknown
QUITA 250 reply to RCPT TO means the server would accept a message for this address, and 550 5.1.1 means there is no such mailbox. The DATA command is never sent, so no message reaches the recipient.
It sounds simple, but the method has real limits worth knowing:
- Catch-all domains accept every address, including non-existent ones. A
250then proves nothing. That is why we also check a random control address for every domain: if it is accepted too, the domain is catch-all. - Greylisting is a deliberate delay: the server replies with a
4xxcode and asks you to retry in a few minutes. It is not a rejection, just a signal to try later. - Servers that do not reveal whether a mailbox exists accept every address during the conversation and reject non-existent ones only after accepting the message. Some hosting providers and company servers work this way.
- Protection against probing: large providers limit the number of queries and block IP addresses that send too many.
An honest verifier says "I don't know" in these cases instead of guessing. "Domain accepts mail" or "catch-all" is valuable information, but it is not proof that the mailbox exists.
6. How to read a verification result
This is how MailSpecto splits results:
| Status | What we know | What to do |
|---|---|---|
mailbox_exists | The recipient's server confirmed the mailbox | Send |
catch_all | The domain accepts every address | Send with caution, watch bounces |
domain_accepts_mail | DNS and MX work, the mailbox is not confirmed | Send with caution |
risky | Disposable or a likely typo | Check risk_signals and any suggestion |
invalid | Bad syntax, no domain, Null MX or no mailbox | Do not send |
unknown | Could not be decided (e.g. DNS did not answer) | Check again later |
7. Checklist
- Use a simple syntax filter in forms and suggest corrections for domain typos.
- Before saving an address, check DNS: the domain exists, MX, implicit MX and Null MX.
- Reject disposable domains wherever you need a lasting contact.
- Verify mailboxes over SMTP without sending a message, and treat catch-all as its own category.
- Re-check temporary results (DNS timeouts, greylisting) instead of removing the addresses.
- Before a large campaign, verify the whole list, not just new addresses.
Keep your contact list clean
Verify email addresses before you send, and explore our upcoming SPF/DKIM/DMARC diagnostics module.
MailSpecto Engineering Team
We build tools for email address verification, deliverability monitoring and mail infrastructure security diagnostics for companies in Poland and Europe.