npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dmarc-doctor

v0.1.0

Published

Diagnose SPF, DKIM, and DMARC for any domain in one command. Zero deps, npx-friendly.

Readme

dmarc-doctor

Diagnose SPF, DKIM, and DMARC for any domain — in one command. Zero runtime deps.

When your cold email lands in spam, the first thing to check is your domain authentication. dmarc-doctor resolves the right DNS records, parses them, flags common misconfigurations, and tells you how to fix each one.

npx dmarc-doctor example.com

Quickstart

npx dmarc-doctor gmail.com

Sample output:

dmarc-doctor — gmail.com

! SPF — present, with issues
  v=spf1 redirect=_spf.google.com
  ! SPF record should end with ~all (soft fail) or -all (hard fail)

✗ DKIM — not found

! DMARC — present, with issues
  v=DMARC1; p=none; sp=quarantine; rua=mailto:[email protected]
  policy: none
  ! DMARC policy is set to "none". Consider using "quarantine" or "reject" for better protection.

✓ MX — looks good
  5 gmail-smtp-in.l.google.com
  10 alt1.gmail-smtp-in.l.google.com
  ...

How to fix:
  • No DKIM record found across common selectors. Configure DKIM with your email provider.
  • Configure DKIM to improve deliverability and protect against spoofing.

What it checks

| Record | What dmarc-doctor looks for | |--------|---| | SPF | A v=spf1 TXT record at the apex domain. Flags missing ~all/-all, and >10 include: lookups (the SPF DNS-lookup limit). | | DKIM | TXT records at <selector>._domainkey.<domain> for the most common selectors: default, google, k1, selector1, selector2, dkim, s1, s2. Override with --selectors. | | DMARC | A v=DMARC1 TXT record at _dmarc.<domain>. Extracts the p= policy and flags p=none and missing rua=/ruf= reporting addresses. | | MX | At least one MX record, sorted by priority. |

Usage

dmarc-doctor <domain> [options]

Options:
  --json              Print machine-readable JSON output
  --no-color          Disable ANSI colors
  --selectors <a,b>   Comma-separated DKIM selectors to probe
  -h, --help          Show help
  -v, --version       Show version

The CLI exits non-zero (1) when any record is missing or has issues, so it works in CI checks and shell pipelines.

# In a deploy script:
dmarc-doctor mail.example.com --json > /tmp/dmarc.json || alert-team

Programmatic API

dmarc-doctor also ships as a tiny library:

import { checkDomain } from 'dmarc-doctor'

const result = await checkDomain('example.com')
if (!result.dmarc.exists) {
  // ...
}

You can inject your own DNS resolver (great for tests):

import { checkDomain, type DnsResolver } from 'dmarc-doctor'

const fake: DnsResolver = {
  async resolveTxt(host) { /* ... */ },
  async resolveMx(host)  { /* ... */ },
}
const result = await checkDomain('example.com', { resolver: fake })

Install

# One-shot
npx dmarc-doctor example.com

# Or globally
npm install -g dmarc-doctor
dmarc-doctor example.com

# Or as a library
npm install dmarc-doctor

Requires Node.js 18+.

The full platform

dmarc-doctor is the standalone CLI version of the deliverability checker that ships inside coldflow — the open-source cold-email platform from pypesdev. If you like this tool, check out coldflow for the full sending stack: warming, sequences, and inbox health monitoring.

Contributing

git clone [email protected]:pypesdev/dmarc-doctor.git
cd dmarc-doctor
npm install
npm test

PRs welcome — especially additional DKIM selectors, smarter SPF recursion checks, or BIMI/MTA-STS support.

License

MIT © pypesdev