Deliverability
Live A–F DNS audits, pre-send spam scoring, complaint feedback loops (RFC 5965 ARF / JMRP), and automated IP warm-up with failover overflow.
DNS health audit (A–F)
/api/v1/deliverability/domains/{id}/auditRequires domains:readLooks up live DNS records for a domain, scores authentication health from 0 to 100 (graded A to F), and returns a prioritised list of paste-ready DNS fixes:
- SPF (25 pts): Detects missing or duplicate SPF records, rejects
+all, walks the full recursive include tree against RFC 7208's 10-DNS-lookup limit, and checks forMTAKIT_SPF_HOST. - DKIM (30 pts): Verifies the selector record exists, matches the RSA-2048 key MTAKit signs with, checks key length, and flags lingering
t=ytest flags. - DMARC (35 pts): Inspects policy,
pct, subdomain policy (sp), and externalruaauthorisation, guiding progressive rollout:p=none→p=quarantine; pct=25→p=quarantine→p=reject. - BIMI (5 pts) & MTA-STS / TLS-RPT (5 pts): Validates DMARC enforcement prerequisites, HTTPS SVG Tiny-PS logo, VMC readiness for Gmail and Apple Mail, and optional inbound TLS reporting.
curl https://mail.example.com/api/v1/deliverability/domains/0a4d9a52-0a8e-4f4e-b4f7-6f4f6a2f9a11/audit \
-H "Authorization: Bearer $MTAKIT_API_KEY"Pre-send spam gate
/api/v1/deliverability/spam-checkRequires emails:sendA deterministic sub-millisecond content and header linter. Lower scores are better: scores 3.0 and above return a warning, and 5.0 and above indicate likely spam.
curl -X POST https://mail.example.com/api/v1/deliverability/spam-check \
-H "Authorization: Bearer $MTAKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <orders@acme.com>",
"subject": "Order 94821 confirmed",
"html": "<p>Your shipment is scheduled for tomorrow.</p>",
"text": "Your shipment is scheduled for tomorrow.",
"stream": "transactional"
}'The same check also runs automatically inside POST /api/v1/emails. Control enforcement per request via the X-MTAKit-Spam-Check header or globally with MTAKIT_SPAM_CHECK_MODE:
| Mode | Behaviour |
|---|---|
report | Default. Attaches spamCheck: { score, verdict, rules } to the 202 response without blocking. |
enforce | Refuses messages scoring at or above MTAKIT_SPAM_BLOCK_SCORE (default 5) with HTTP 422 and full rule details. |
off | Skips the pre-send content linter. |
Complaint feedback loops (FBL)
MTAKit automatically adds a Feedback-ID header to outbound emails so Google Postmaster Tools can group complaints by tenant and stream.
/api/v1/deliverability/fblHMAC signatureAuthenticated via X-MTAKit-Signature: sha256=<hex> keyed with FBL_WEBHOOK_SECRET (falls back to INBOUND_WEBHOOK_SECRET). Accepts:
- Raw complaint report emails (RFC 5965 ARF or Microsoft JMRP with attached original).
{ "raw": "<raw report email>" }asapplication/json.- Structured JSON payloads from upstream providers (
{ recipient, emailId, messageId, feedbackType, source }).
SIG=$(openssl dgst -sha256 -hmac "$FBL_WEBHOOK_SECRET" -hex < report.eml | awk '{print $NF}')
curl -X POST https://mail.example.com/api/v1/deliverability/fbl \
-H "content-type: message/rfc822" \
-H "x-mtakit-signature: sha256=$SIG" \
--data-binary @report.emlAbuse complaints mark the original message complained, record an event, and automatically add the recipient to your suppression list with reason spam_complaint. Reports of type not-spam and auth-failure are acknowledged without suppressing.
/api/v1/deliverability/complaintsRequires emails:readReturns recent complaints and your 30-day complaint rate alongside Gmail and Yahoo warning (0.1%) and rejection (0.3%) thresholds.
Automated IP warm-up
Fresh own_mta or custom_smtp IPs build sender reputation using a geometric daily recipient cap that expands automatically:
| Preset | Start / day | Daily growth | Days to 10,000 / day |
|---|---|---|---|
conservative | 50 | 20% | 31 |
standard | 50 | 35% | 19 |
aggressive | 100 | 60% | 11 |
Execution guarantees
- Atomic SQL budget reservation: Parallel workers claim daily warm-up quota in a single SQL statement so concurrent traffic never overshoots today's limit.
- Automatic failover overflow: Once the warming route exhausts today's budget, excess mail overflows via your failover chain (AWS SES, Postmark, Resend) and logs
warmup_overflow. If no fallback exists, mail still delivers (warmup_over_cap) and fails open on errors. - 24-hour health guard: Over the last 24 hours (min. 100 recipients), a bounce rate ≥ 5% or complaint rate ≥ 0.1% halves the cap; ≥ 10% bounce or ≥ 0.3% complaint stops the warming route until metrics recover.
/api/v1/deliverability/warmupRequires providers:read/api/v1/deliverability/warmupRequires providers:manageproviderIdstringrequired- UUID of the own_mta or custom_smtp route.
presetstringrequiredconservative,standard, oraggressive.targetDailyVolumeintegerrequired- Target daily recipients where the warm-up plan completes and stops capping.
curl -X POST https://mail.example.com/api/v1/deliverability/warmup \
-H "Authorization: Bearer $MTAKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"providerId": "b1b6f0de-2f55-4f6c-8d0a-5d1c1d7f6a20",
"preset": "standard",
"targetDailyVolume": 50000
}'/api/v1/deliverability/warmup/{id}Requires providers:manage/api/v1/deliverability/warmup/{id}Requires providers:manage{
"ok": true,
"status": "paused"
}Environment variables
| Variable | Purpose | Default |
|---|---|---|
FBL_WEBHOOK_SECRET | HMAC key for FBL intake | INBOUND_WEBHOOK_SECRET |
MTAKIT_SPAM_CHECK_MODE | off, report or enforce | report |
MTAKIT_SPAM_BLOCK_SCORE | Score threshold blocking sends in enforce mode | 5 |
MTAKIT_SPF_HOST | SPF include host verified by the DNS audit | none |