DEV Community

Kacper
Kacper

Posted on

I turned a 30-second security check into an app you can connect to Claude or ChatGPT

Last week I checked the email security of eight automation agencies and seven of them could be spoofed. The check itself is two DNS lookups and takes about thirty seconds, which raises an obvious question: if it's that cheap, why does almost nobody run it?

Because it's thirty seconds you have to remember to spend, on a thing that produces no visible symptom when it's broken. Nobody wakes up thinking "I should verify my SPF record today."

So I moved the check to where the questions already get asked. It's now an MCP server you can connect to Claude or ChatGPT, and then just ask.

What it does

Connect it, then type something like "can people spoof email from stripe.com?" and the assistant runs the actual DNS lookups and comes back with a graded report:

## Email security report: example.com
**Grade: D — effectively spoofable**

| Check | Result |
|---|---|
| MX | 10 mx01.example-host.com. |
| SPF | v=spf1 include:_spf.google.com ~all |
| DMARC | v=DMARC1; p=none |
| DKIM | selectors: google |

### Problems (1), most severe first
- **[MEDIUM]** DMARC is p=none — monitoring mode. Receivers check
  alignment and then do nothing on failure; a forged invoice from this
  domain lands like real mail.
  - Fix: after ~2 clean weeks of reports, move to p=quarantine.
Enter fullscreen mode Exit fullscreen mode

There's a second tool that compares up to five domains side by side, which is uncomfortable in a useful way if you run it on yourself and your competitors.

Connecting it

It's authless — it reads public DNS and stores nothing, so there's no signup, no key, no OAuth.

Claude: Settings → Connectors → Add custom connector, and paste:

https://deliverability-doctor.deliverability-doctor.workers.dev/mcp
Enter fullscreen mode Exit fullscreen mode

ChatGPT: same URL as a custom MCP connector.

Then ask it about any domain in plain language.

The three findings it's actually looking for

No SPF at all. Anyone can send as you, today. One of the eight agencies I scanned was in this state on a Google-hosted domain.

More than one SPF record. This is the one that surprises people. Per RFC 7208, a receiver that finds two v=spf1 records is required to return permerror — and most treat permerror as no SPF at all. So the company that carefully added a second record for their new mailing tool didn't add protection, they deleted it. It happens constantly and it's invisible unless you look.

p=none DMARC. The sneaky one, because it looks handled. It's monitoring mode: receivers check alignment, then do nothing on failure. Six of my eight had it. A p=none with no rua= address is the worst version — not enforcing, and not collecting the reports that would tell you spoofing is happening.

Building it, briefly

Two things I'd do again.

I used DNS-over-HTTPS rather than Node's dns module. That decision looked like fussiness at the time; it meant the same analyzer file ran unchanged locally and then on Cloudflare Workers when I deployed, because Workers has no dns module. Choosing the more portable primitive early cost nothing and saved a rewrite.

And I tested the analyzer against domains whose answers I already knew before wiring up any protocol. That caught two real bugs. gmail.com was being flagged for a missing all mechanism — but its SPF ends in redirect=, which validly replaces all, so the tool was wrong and Google was right. And a domain that doesn't exist was being graded F — spoofable today, which is nonsense: NXDOMAIN means there's no domain to spoof. Both were fixed before the server ran once. Neither would have been caught by testing against domains I hadn't already characterised.

Honest limits

DKIM detection probes seven common selectors, so a custom selector reads as "not found" — that's why it never counts against the grade. The tool sees DNS only: it can't tell you whether your mail actually lands in inboxes, only whether receivers have been told who's allowed to send. And a grade of A means the authentication records are right, not that your sending reputation is good.

If you'd rather not connect anything, the free version is still two commands:

nslookup -type=TXT yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.com
Enter fullscreen mode Exit fullscreen mode

Run those before you connect anything of mine, or anyone else's.

— Kacper Konieczny, Łódź

Top comments (0)