Since Google and Yahoo started rejecting mail from domains without proper SPF, DKIM and DMARC, checking these records has become routine. Online checkers do it one domain at a time. When you manage 50 client domains, or want to audit a list of prospects, you need it in bulk.
This post shows how to check SPF, DMARC, DKIM, MX, DNSSEC and DNS propagation for any number of domains in one run, and get an A-F grade with the reasons for every domain.
What gets checked
For each domain:
- Records: A, AAAA, CNAME, MX, NS, TXT, SOA and CAA, with TTLs.
- SPF: present, more than one record (invalid),
+all(anyone can send as you),~allvs-all, and the number of DNS lookups (the limit is 10). It also names the senders it includes: Google Workspace, Microsoft 365, SendGrid, Mailchimp, HubSpot… - DMARC: policy (
none,quarantine,reject), percentage, and where reports go. - DKIM: which of 30 common selectors (google, selector1, selector2, k1, s1, mandrill…) publish a key, plus any selectors you add.
- Mail provider, from the MX records.
- DNSSEC: whether answers are validated.
- Propagation: the same question to 8 public resolvers (Google, Cloudflare, OpenDNS, AdGuard, NextDNS and others), showing which ones still give an old answer.
Then each domain gets a grade:
| Grade | Meaning |
|---|---|
| A | SPF, DMARC with an enforcing policy, DKIM found |
| B | DMARC set to none (monitoring only) |
| C/D | Missing DKIM or DMARC |
| F | No SPF and no DMARC, or SPF ends with +all |
…with a plain-English list of problems, such as "no DMARC record" or "SPF needs 12 DNS lookups (limit is 10)".
Running it
No code: open the DNS Lookup, Propagation & Email Security Checker on Apify, paste your domains and press Start.
From Python:
from apify_client import ApifyClient client = ApifyClient("YOUR_APIFY_TOKEN") run = client.actor("apt_squirrel/dns-lookup-propagation").call(run_input={ "domains": ["acme-corp.com", "acme-shop.com", "old-brand.com"], }) for row in client.dataset(run["defaultDatasetId"]).iterate_items(): print(f'{row["domain"]:20} {row["emailGrade"]} {row["mailProvider"]}') for problem in row["emailProblems"]: print(" -", problem) The output looks like this (illustrative domains):
acme-corp.com A Google Workspace acme-shop.com B Microsoft 365 - DMARC policy is none (monitoring only) old-brand.com F None - no MX records: the domain does not receive email - no DMARC record - no DKIM key found on common selectors After a DNS change
Changed your MX or moved hosting? Set propagationTypes to the records you changed and run it every few minutes. propagated turns true when every resolver gives the same answer, and differentResolvers tells you who is still behind.
Cost
$2 per 1,000 domains. The Apify free plan's $5 monthly credit covers a few thousand domains.
Related tools
The same account has an SSL certificate checker (expiry, issuer, TLS version, for any number of hosts), a subdomain finder based on certificate transparency logs, and a bulk WHOIS/RDAP lookup. Together they make a decent domain audit pipeline.
Questions or a record type you'd like added? Leave a comment.