---
name: "deliverability-monitor"
description: "Build a deliverability monitor: collect daily send, bounce, complaint and reply counts per inbox and domain, set warn and pause thresholds with a minimum send count and a rolling window, compute rates, auto-pause inboxes over the pause line, alert a person with the cause to check, publish a plain domain health dashboard, and resume slowly after diagnosis. Use for any program sending cold or high-volume email from several inboxes."
---

# Deliverability monitor

## Goal
Catch reputation damage while it is small, stop it automatically, and always know the health of every sending domain. Part of GTM engineering. Fed by: inbox-infrastructure-stack, multi-channel-orchestrator, reply-classifier (bounce and complaint labels). Feeds: inbox-infrastructure-stack (changes), experiment-harness (stop rules).

## When to use
- More than a couple of inboxes send outbound.
- You have burned a domain before.
- Nobody owns a daily check.

## Inputs
- Daily stats per inbox: sent, bounced, complaints, replies.
- Postmaster data from the mailbox providers where available (domain reputation, spam rate).
- Thresholds agreed by sales and operations.
- A way to pause an inbox: the sending tool's action or API.

## Data model
`stats`: `date, domain, inbox, sent, bounced, complaints, replies`
`thresholds.json`: `window_days, min_sent, bounce_warn, bounce_pause, complaint_warn, complaint_pause`
`status`: `scope (inbox or domain), name, sent, bounce_rate, complaint_rate, reply_rate, status, action`
`pause_log`: `timestamp, inbox, reason, numbers, resumed_at, resumed_by`

## Step 1. Set thresholds
- Complaints: large mailbox providers publish guidance to keep the spam rate under 0.10 percent and never reach 0.30 percent. Use warn at 0.10 and pause at 0.30 as the outer limits, and tighten them if you can.
- Bounces: choose from your own history. Many teams warn around 2 percent and pause around 5 percent, as a starting point.
- Minimum sends in the window before rates count (for example 50), because rates on tiny counts mislead.
- Window: a rolling 7 days is common.

## Step 2. Collect
Export per-inbox daily stats from the sending tool. Add domain-level spam rate and reputation from the providers' postmaster tools where you have access. Missing data is "unknown", never zero.

## Step 3. Check
Run `scripts/deliverability_check.py check stats.csv thresholds.json`. For each inbox and for each domain, compute bounce, complaint and reply rates over the window. Status:
- `ok`: under the warn lines.
- `warn`: at or over a warn line.
- `pause`: at or over a pause line with enough sends.
- `low_volume`: not enough sends yet.
Inboxes with status `pause` are your pause list.

## Step 4. Pause and alert
For every `pause`: call the pause action, write the pause log, and post an alert to the team channel with the numbers, the campaign and list source, and the question to check first. If more than one inbox on a domain is paused, pause the whole domain.

## Step 5. Diagnose before resuming
Check, in order: the list source and verification, the share of brand-new contacts, the message and its links, the ramp speed against the plan, and authentication (DNS check in inbox-infrastructure-stack). Fix the cause first.

## Step 6. Resume slowly
A person resumes. Restart at about half the previous volume, hold for a week, and raise gradually. Log who resumed and why.

## Step 7. Dashboard
`scripts/deliverability_check.py dashboard` writes a table per domain: inboxes, sent, bounce, complaint and reply rates, status, paused inboxes. Review it weekly with sales. Keep a monthly record of domain reputation so trends are visible.

## Tool options
A sending tool with an export or API and a pause action. Postmaster dashboards from the mailbox providers. A scheduled script or workflow for the daily run. Slack for alerts. A seed testing service for placement.

## Output
`status.csv` (the rows with status `pause` are the pause list), `dashboard.md` and the pause log.

## Success metrics
- Bounce and complaint rates by domain over time.
- Time from threshold breach to pause.
- Number of domains retired per quarter.
- Reply rate per inbox (a sudden fall is an early warning).
- Share of sends from verified emails.

## Guardrails
- Pause first, investigate second. Do not hide a breach by lowering a threshold.
- Honour every complaint and unsubscribe immediately.
- Do not rotate domains to evade complaints or filters. Fix the cause.
- Keep the main company domain out of cold sending.
- Auto-pause is automatic. Resuming is a human decision.
