4-Layer Validation Pipeline
GTMAPIs uses a 4-layer validation pipeline to produce canonical validation statuses, B2B quality signals, and credit charge metadata.Pipeline Overview
Layer 1: Syntax Validation
Goal: Verify the email follows RFC 5322 format Checks:- Valid email structure (local@domain)
- Allowed characters and special cases
- Proper quoting and escaping
- Length constraints (64 chars for local, 255 for domain)
- ✅
john@company.com - ✅
john.doe+tag@company.co.uk - ❌
invalid@ - ❌
@domain.com - ❌
spaces are@notallowed.com
If syntax validation fails, we immediately return
invalid without proceeding to DNS/SMTP checks.Layer 2: DNS Validation
Goal: Verify the domain can receive email Checks:- MX record lookup via DNS
- Fallback to A/AAAA records if no MX
- Domain existence verification
- DNS timeout handling (2s default)
- MX lookups may be cached to reduce repeated DNS work
- Cache-first checks keep repeated validations consistent and efficient
- Provider-call budgets guard external validation work
- ✅
gmail.com→ MX records found - ✅
company.com→ MX records found - ❌
fakeemail123notreal.com→ No DNS records
Layer 3: SMTP Validation
Goal: Verify mailbox existence when the receiving server provides a reliable SMTP signal Process:- Connect to mail server via SMTP (port 25)
- Initiate SMTP conversation (HELO/EHLO)
- Specify sender (MAIL FROM)
- Attempt recipient verification (RCPT TO)
- Parse server response
SMTP Response Codes:
250- Mailbox exists ✅550- Mailbox doesn’t exist ❌451/452- Temporary failure (greylisting) ⏳421- Service unavailable 🔒
5xx responses that do not prove whether the mailbox exists. GTMAPIs returns unknown for temporary, blocked, timed-out, or inconclusive SMTP outcomes and does not charge credits for them.
Layer 4: Catch-All Detection
Goal: Identify domains that accept all emails (low value for outbound) Detection Methods:1. Random Address Testing
Send RCPT TO commands with random, obviously fake addresses:2. Pattern Scoring
We analyze multiple signals:- Response time consistency
- Multiple random addresses accepted
- Server banner analysis
- Known catch-all provider patterns
3. Confidence Scoring
- Can’t verify individual mailbox existence through standard SMTP checks
- Low B2B outbound certainty for the specific address
- Possible delivery uncertainty
risky rather than chargeable valid because the specific recipient remains unverifiable. See Catch-all detection vs recovery for how this differs from opt-in recovery scoring.
Catch-all emails are marked as
risky and don’t consume credits since their outbound value is low.Pipeline Performance
Validation latency depends on cache state, DNS behavior, SMTP server behavior, and provider-call budget availability. Transport failures are retried or surfaced as execution failures rather than persisted as syntheticunknown validation results.
Error Handling
Each layer has graceful degradation:- Syntax Fail → Return
invalidimmediately - DNS Fail → Return
invalid(domain doesn’t exist) - SMTP Temporary, Blocked, Timeout, or Inconclusive → Return
unknown(domain may receive email, but mailbox status is not proven) - Definitive SMTP Mailbox Reject → Return
invalid(mailbox does not exist) - Catch-All Detected → Return
risky(domain accepts broadly, so the specific mailbox is unverifiable)
Next Steps
B2B Quality Scoring
Learn how we score emails for outbound value
Result Categories
Understand all possible validation results
Catch-all Detection vs Recovery
Learn why catch-all detection is not mailbox proof.