Email Validation

Email Validation Overview

Cleanmails includes a high-performance email validation engine that checks addresses through multiple layers — from instant syntax checks to deep SMTP handshakes. It supports single verification via API and bulk processing of 100k+ lists.

Validation Levels

Level 1 — Fast Analysis (Near-Instant)

Performs all checks that don't require network connections:

  • Syntax validation — RFC-compliant regex check
  • MX record lookup — Verifies the domain has mail servers
  • Disposable detection — Checks against 126,000+ known disposable domains (auto-updated daily)
  • Role-based detection — Identifies addresses like info@, admin@, support@
  • Free provider detection — Flags Gmail, Yahoo, Outlook, etc.
  • Domain suggestion — Suggests corrections for typos (e.g., gmial.com → gmail.com)
Speed

Level 1 processes 10,000+ emails per minute since it only requires DNS lookups and local database checks.

Level 2 — Deep SMTP Handshake

Performs a real SMTP conversation with the recipient's mail server:

  • Mailbox existence check — Sends RCPT TO command to verify the address exists
  • Catch-all detection — Tests with random addresses to detect accept-all domains
  • Full inbox detection — Identifies mailboxes that are over quota
  • Greylisting detection — Handles temporary rejections
  • API-based verification — Uses specialized methods for Google, Yahoo, and Outlook
Port 25 Required

Level 2 verification requires outbound port 25 to be open. If blocked, the system automatically falls back to Level 1 results.

Verification Result

Every verification returns a structured result:

Verification Response
{
  "email": "john@example.com",
  "reachable": "yes",
  "syntax": {
    "username": "john",
    "domain": "example.com",
    "valid": true
  },
  "smtp": {
    "host_exists": true,
    "full_inbox": false,
    "catch_all": false,
    "deliverable": true,
    "disabled": false
  },
  "gravatar": {
    "has_gravatar": true,
    "gravatar_url": "https://www.gravatar.com/avatar/..."
  },
  "suggestion": "",
  "disposable": false,
  "role_account": false,
  "free": false,
  "has_mx_records": true
}

Reachable Values

ValueMeaning
yesEmail is deliverable — SMTP confirmed the mailbox exists
noEmail is invalid — mailbox doesn't exist or domain has no MX
unknownCan't determine — catch-all domain, or SMTP check disabled/blocked

Single Email Verification

bash
curl -X POST http://YOUR_SERVER/v1/verify \
  -H "Content-Type: application/json" \
  -H "Cookie: auth_token=YOUR_SESSION" \
  -d '{"email": "john@example.com", "level": 2}'

Bulk Verification

Submit up to 100,000 emails in a single request:

bash
curl -X POST http://YOUR_SERVER/v1/bulk \
  -H "Content-Type: application/json" \
  -H "Cookie: auth_token=YOUR_SESSION" \
  -d '{
    "emails": ["user1@example.com", "user2@test.com", "..."],
    "level": 2,
    "concurrency": 100,
    "store_results": true
  }'

Returns a job ID that you can poll for status:

bash
# Check job status
curl http://YOUR_SERVER/v1/bulk/JOB_ID

# Get results (paginated)
curl "http://YOUR_SERVER/v1/bulk/JOB_ID/results?offset=0&limit=1000"

# Download as CSV
curl http://YOUR_SERVER/v1/bulk/JOB_ID/download

Provider-Specific Verification

Cleanmails uses specialized API-based methods for major providers that block traditional SMTP checks:

ProviderMethod
Google (Gmail)GXLU endpoint — checks COMPASS cookie presence
YahooSignup validation endpoint — checks IDENTIFIER_EXISTS error
Outlook/HotmailGetSelfSignedKey endpoint — checks response status

Performance

MetricValue
Level 1 speed10,000+ emails/minute
Level 2 speed50-100 emails/second (network dependent)
Accuracy>98.5% on standard SMTP checks
Max batch size100,000 emails per request
Disposable blocklist126,000+ domains (auto-updated daily)