Wired Pipeline

case study 09 · monitoring after launch

A daily health check that notices when a domain breaks

domain monitoringblocklistsSPF, DKIM, DMARCPythonsystemd

The problem

Email setups don't stay fixed. Someone adds a new tool and edits SPF, a DNS migration drops a DKIM key, DMARC gets set back to "none" during a test and never goes back, a sending IP lands on a blocklist. Nobody notices until replies dry up or the open rate falls off a cliff, sometimes weeks later.

What we built

  • A script that runs every morning at 7:30 and snapshots every domain: grade, SPF, DMARC, MX, every DKIM key and its size, and blocklist status
  • It compares today with yesterday and writes an alert for anything that changed
  • Blocklists: Spamcop and Barracuda, checked against each domain's mail servers
  • Uses the same checks as the free checker, so the grade means the same thing everywhere
  • Runs as a scheduled job on our own server, no paid monitoring service
  • Watching 35 domains now: two of our own plus the 33 from the tool teardown

What an alert looks like

To prove the alerts fire, we copied today's real snapshot and edited it to look like a bad night on menacollect.com: someone stacks two new senders into SPF, sets DMARC back to "none", the DKIM key goes missing and a mail server lands on Spamcop. This is the monitor's actual output on that test:

ALERT  menacollect.com   grade A -> C
ALERT  menacollect.com   SPF changed: 'v=spf1 include:zoho.com ~all'
                           -> 'v=spf1 include:zoho.com include:sendgrid.net include:mailgun.org ~all'
ALERT  menacollect.com   DMARC changed: 'p=quarantine ...' -> 'v=DMARC1; p=none'
ALERT  menacollect.com   DKIM selector 'zmail' disappeared
ALERT  menacollect.com   newly blocklisted: 192.0.2.25 on bl.spamcop.net

Five lines, worst news first, each one telling you exactly what to look at. The real snapshot shows none of this. menacollect.com is fine, and the blocklisted IP is a documentation-only address, so no real server is named.

The part we're proudest of: refusing a false all-clear

Monitoring that says "all clear" when it couldn't actually check is worse than no monitoring. So every blocklist gets tested against its own test entry first. Spamcop and Barracuda answered. Spamhaus refuses public DNS servers, so it's left out on purpose. SURBL gave no answer at all, even for its own test entry, which means it would have reported every domain as clean forever. We dropped it rather than show a green check we couldn't trust.

✓ 35 domains, checked every morning, baseline taken 2026-11-14
✓ Alerts on any change to grade, SPF, DMARC, MX, DKIM keys or blocklist status
✓ Every blocklist verified against its test entry, so "clean" means clean
✓ Free to run: Python standard library and a scheduled job
# the alert example is a test on an edited copy. the daily runs are real.

Want someone watching your domains?

Catch the broken record the morning it happens, not three weeks into a bad campaign.