I needed to answer one question for a list of a few hundred companies: what do they run, and who handles their email? The usual tools want a monthly subscription, rate-limit you, and still miss half of what's publicly visible in DNS.

It turns out you don't need a headless browser or a paid API for most of it. Four DNS lookups and one HTTP request tell you:

  • which SaaS the company signed up for (OpenAI, Anthropic, Atlassian, DocuSign, Stripe...), from one TXT query;
  • who hosts their mailbox (Google Workspace, Microsoft 365, Proofpoint...);
  • which services send email on their behalf, and whether their SPF is about to break;
  • how strict their email authentication is (DMARC);
  • what the website is built and tracked with.

Everything below is plain Python (dnspython + httpx, async), and every number in this post comes from a real run on 4 December 2026.

The result first

I ran the script on 12 well-known domains. It took 4.4 seconds:

Domain Site Mailbox Sends via (SPF) SPF lookups DMARC
linear.app Next.js, Cloudflare Google Workspace Amazon SES, HubSpot, Postmark 4 reject
stripe.com Next.js Google Workspace Amazon SES, Zendesk 7 reject
vercel.com Next.js, Vercel Google Workspace Amazon SES, Postmark, Salesforce, SendGrid 10 quarantine
zapier.com Next.js, Vercel, Mixpanel, OneTrust Google Workspace HubSpot, Mailgun, Zendesk 9 reject
figma.com Next.js, Netlify, Mixpanel Google Workspace Zendesk 4 quarantine
calendly.com CloudFront, Cloudflare, GTM Google Workspace Google 3 quarantine
hubspot.com HubSpot CMS, Cloudflare Google Workspace (custom) 4 reject
allbirds.com Shopify, Cloudflare, GTM Microsoft 365 Microsoft 365 5 quarantine
gymshark.com Shopify, Cloudflare Proofpoint (custom) 1 reject
posthog.com Gatsby, Vercel, PostHog Google Workspace Amazon SES, Mailchimp, Mailgun, Zendesk 10 quarantine
notion.so Next.js, Vercel, Cloudflare no MX - 0 quarantine
plausible.io (nothing matched) Other - 2 quarantine

And the column most people don't know exists, SaaS verified in DNS:

Domain Verified SaaS (from TXT records)
linear.app Anthropic, OpenAI, Notion, Slack, Stripe, Zoom, DocuSign, Apple, Microsoft 365
stripe.com Anthropic, OpenAI, Atlassian, Notion, DocuSign, Meta Business, Apple
gymshark.com Anthropic, OpenAI, Adobe, Atlassian, OneTrust, Meta Business
calendly.com OpenAI, HubSpot, Slack, Zoom, Miro, Atlassian, OneTrust, Stripe, Adobe
figma.com Anthropic, OpenAI, 1Password, Notion, Atlassian, Adobe, Stripe

A few things in there are worth a closer look:

  • vercel.com and posthog.com are at exactly 10 SPF DNS lookups. RFC 7208 caps SPF evaluation at 10. One more include: (say, marketing adds a new email tool) and receivers return permerror, which means SPF fails for all their mail. Zapier is at 9.
  • notion.so has no MX record. The marketing domain is not the mail domain. If you're building a lead list, "no MX" doesn't mean "no email", it means "look at the domain they actually send from".
  • A retail brand (Gymshark) has verified both Anthropic and OpenAI. You can find that out without talking to anyone.

Let's build it.

Part 1: the TXT record nobody looks at

When a company connects a domain to a SaaS product (to enable SSO, claim the workspace, or prove ownership), the vendor asks them to add a TXT record like openai-domain-verification=dv-... or atlassian-domain-verification=.... These records are public, and they usually stay there for years.

One query for all TXT records on the root domain gives you a list of vendors:

# pip install dnspython httpx import asyncio import dns.asyncresolver resolver = dns.asyncresolver.Resolver() resolver.lifetime = 5 # seconds; some authoritative servers are slow TXT_VERIFICATIONS = { "google-site-verification": "Google Search Console", "MS=": "Microsoft 365", "atlassian-domain-verification": "Atlassian", "facebook-domain-verification": "Meta Business", "docusign": "DocuSign", "stripe-verification": "Stripe", "hubspot-developer-verification": "HubSpot", "apple-domain-verification": "Apple", "slack-domain-verification": "Slack", "zoom-domain-verification": "Zoom", "miro-verification": "Miro", "openai-domain-verification": "OpenAI", "anthropic-domain-verification": "Anthropic", "notion-domain-verification": "Notion", "adobe-idp-site-verification": "Adobe", "onetrust-domain-verification": "OneTrust", "1password-site-verification": "1Password", "cisco-ci-domain-verification": "Webex", } async def txt(name: str) -> list[str]: try: answer = await resolver.resolve(name, "TXT") # long TXT values are split into 255-byte strings; join them back return [b"".join(r.strings).decode(errors="replace") for r in answer] except Exception: # NXDOMAIN, NoAnswer, timeout: treat as "no records" return [] async def verified_saas(domain: str) -> list[str]: records = await txt(domain) return sorted({name for t in records for prefix, name in TXT_VERIFICATIONS.items() if t.startswith(prefix)}) print(asyncio.run(verified_saas("linear.app"))) 

Two honest caveats:

  • Verified does not mean active. Tokens are rarely cleaned up. Treat it as "they had an account at some point", which is still a strong signal for sales ("you already use Atlassian, we integrate with Jira").
  • Absence means nothing. Many vendors verify via a CNAME on a subdomain or via email instead of TXT.

Add your own prefixes: open the DNS of a few companies you know and you'll find more (cursor-domain-verification, postman-domain-verification and so on).

Part 2: who hosts the mailbox (MX)

MX records say who receives mail. Sort by preference and match the host against known providers:

MX_PROVIDERS = { "google.com": "Google Workspace", "googlemail.com": "Google Workspace", "outlook.com": "Microsoft 365", "zoho.": "Zoho", "pphosted.com": "Proofpoint", "mimecast.com": "Mimecast", "messagingengine.com": "Fastmail", "icloud.com": "iCloud", "barracudanetworks.com": "Barracuda", } async def mail_provider(domain: str) -> str: try: mx = sorted(await resolver.resolve(domain, "MX"), key=lambda r: r.preference) except Exception: return "None" hosts = [str(r.exchange).rstrip(".").lower() for r in mx] return next((name for h in hosts for key, name in MX_PROVIDERS.items() if key in h), "Other") 

Note that Proofpoint and Mimecast are security gateways, not mailbox providers. Gymshark's real mailbox sits behind Proofpoint. For segmentation that's still useful: a company paying for Proofpoint is usually an enterprise buyer with a security team.

Part 3: SPF, done properly (recursive, with the 10-lookup limit)

This is the part most quick scripts get wrong. They read the root SPF record and grep it for sendgrid.net. But real SPF records are nested:

v=spf1 include:_spf.google.com include:spf.company.com ~all └── include:sendgrid.net include:mail.zendesk.com ... 

If you only read the top level, you miss most senders. And you can't see the problem that actually hurts companies: the 10 DNS-lookup limit. Every include:, a, mx, exists:, ptr and redirect= costs one lookup, including the nested ones. Over 10 and SPF evaluation fails with permerror.

import re async def spf_tree(domain: str, depth: int = 0, seen: set | None = None) -> tuple[list[str], int]: """Follow include:/redirect= recursively. Returns (all include targets, DNS lookup count).""" seen = seen if seen is not None else set() if depth > 10 or domain in seen: # guard against loops in broken records return [], 0 seen.add(domain) record = next((t for t in await txt(domain) if t.lower().startswith("v=spf1")), "") targets, lookups = [], 0 for term in record.split(): term = term.lstrip("+-~?").lower() # strip qualifiers if term.startswith(("include:", "redirect=")): target = re.split("[:=]", term, maxsplit=1)[1] targets.append(target) lookups += 1 sub_targets, sub_lookups = await spf_tree(target, depth + 1, seen) targets += sub_targets lookups += sub_lookups elif term in ("a", "mx", "ptr") or term.startswith(("a:", "mx:", "exists:", "ptr:")): lookups += 1 # ip4:, ip6: and all don't cost a lookup return targets, lookups SPF_SENDERS = { "_spf.google.com": "Google Workspace", "spf.protection.outlook.com": "Microsoft 365", "sendgrid.net": "SendGrid", "mailgun.org": "Mailgun", "amazonses.com": "Amazon SES", "mtasv.net": "Postmark", "spf.mandrillapp.com": "Mailchimp Transactional", "servers.mcsv.net": "Mailchimp", "hubspotemail.net": "HubSpot", "_spf.salesforce.com": "Salesforce", "mail.zendesk.com": "Zendesk", "customeriomail.com": "Customer.io", "spf.intercom.io": "Intercom", "sparkpostmail.com": "SparkPost", "_spf.klaviyo.com": "Klaviyo", } async def senders(domain: str) -> tuple[list[str], int]: includes, lookups = await spf_tree(domain) found = sorted({n for inc in includes for key, n in SPF_SENDERS.items() if key in inc}) return found, lookups 

For vercel.com this returns ['Amazon SES', 'Postmark', 'Salesforce', 'SendGrid'] and 10 lookups. PostHog's record looks harmless: six includes on one line. But include:mailgun.org points to two more includes, and one of those points to two more. That one vendor costs 5 lookups, and the total is exactly 10. Nobody sees this from the top-level record. If you sell deliverability services, a list of domains at 9 or 10 is a list of people who will have a bad week soon.

Part 4: DMARC in four lines

DMARC lives in a TXT record at _dmarc.<domain>. The p= tag is the policy: none (monitor only), quarantine (spam folder), reject (bounce).

async def dmarc(domain: str) -> dict: record = next((t for t in await txt(f"_dmarc.{domain}") if t.lower().startswith("v=dmarc1")), "") tags = dict(p.strip().split("=", 1) for p in record.split(";") if "=" in p) return {"policy": tags.get("p", "missing").lower(), "pct": tags.get("pct", "100")} 

Since Google and Yahoo started requiring DMARC for bulk senders in 2024, missing or p=none with several SPF senders is a clear "needs help" signal. All 12 domains above are at quarantine or reject, so big SaaS has caught up; small businesses mostly haven't.

Part 5: what the website is built with

Technologies leave fingerprints in the HTML (script URLs, global variables) and in response headers. A signature table covers a lot:

import httpx SIGNATURES = { "Next.js": r"/_next/static/|__NEXT_DATA__", "Nuxt": r"/_nuxt/|__NUXT__", "Gatsby": r"___gatsby|/page-data/", "Webflow": r"assets\.website-files\.com|data-wf-page", "Framer": r"framerusercontent\.com", "WordPress": r"/wp-content/|/wp-includes/", "Shopify": r"cdn\.shopify\.com|Shopify\.theme", "HubSpot CMS": r"hs-sites\.com|hubspotusercontent", "Google Tag Manager": r"googletagmanager\.com/gtm\.js", "GA4": r"gtag/js\?id=G-", "Segment": r"cdn\.segment\.com", "PostHog": r"posthog\.com|posthog-js", "Amplitude": r"cdn\.amplitude\.com", "Mixpanel": r"cdn\.mxpnl\.com|mixpanel", "Hotjar": r"static\.hotjar\.com", "HubSpot": r"js\.hs-scripts\.com|js\.hsforms\.net", "Marketo": r"munchkin\.marketo\.net", "Intercom": r"widget\.intercom\.io|intercomcdn", "Drift": r"js\.driftt\.com", "Zendesk": r"static\.zdassets\.com", "Stripe": r"js\.stripe\.com", "Sentry": r"browser\.sentry-cdn\.com", "Cookiebot": r"consent\.cookiebot\.com", "OneTrust": r"cdn\.cookielaw\.org", "Klaviyo": r"static\.klaviyo\.com", } HEADER_SIGNATURES = { "cf-ray": "Cloudflare", "x-vercel-id": "Vercel", "x-nf-request-id": "Netlify", "x-amz-cf-id": "CloudFront", "x-served-by": "Fastly", "x-github-request-id": "GitHub Pages", "x-shopify-stage": "Shopify", "x-wix-request-id": "Wix", } def is_challenge(r: httpx.Response) -> bool: """Bot-protection pages return 403/429/503 with a JS challenge instead of the site.""" return r.status_code in (403, 429, 503) and bool( re.search(r"cf-chl|challenge-platform|Just a moment|_Incapsula_|px-captcha", r.text[:5000])) async def homepage(client: httpx.AsyncClient, domain: str) -> dict: err = "error" for scheme in ("https", "http"): # some small sites still have broken TLS try: r = await client.get(f"{scheme}://{domain}") break except httpx.HTTPError as e: err = type(e).__name__ else: return {"status": err, "tech": []} if is_challenge(r): return {"status": f"blocked ({r.status_code})", "tech": []} tech = {n for n, pat in SIGNATURES.items() if re.search(pat, r.text)} tech |= {n for h, n in HEADER_SIGNATURES.items() if h in r.headers} return {"status": r.status_code, "tech": sorted(tech)} 

Why is_challenge matters: without it, a site behind a Cloudflare challenge gets reported as "Cloudflare" with nothing else, and its title becomes "Just a moment...". That row looks valid and silently pollutes your list. Mark it as blocked and keep the DNS data, which is never behind a challenge.

Part 6: run it on a thousand domains

Everything is async, so the only thing left is a semaphore and a CSV writer:

import csv, sys async def analyze(client, sem, domain: str) -> dict: async with sem: web, provider, (snd, lookups), dm, saas = await asyncio.gather( homepage(client, domain), mail_provider(domain), senders(domain), dmarc(domain), verified_saas(domain)) return {"domain": domain, **web, "provider": provider, "senders": snd, "spf_lookups": lookups, "dmarc": dm["policy"], "verified_saas": saas} async def main(domains: list[str]) -> list[dict]: sem = asyncio.Semaphore(20) # 20 domains in flight; raise it carefully headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " "(KHTML, like Gecko) Chrome/130.0 Safari/537.36"} async with httpx.AsyncClient(follow_redirects=True, timeout=15, headers=headers) as client: return await asyncio.gather(*(analyze(client, sem, d) for d in domains)) if __name__ == "__main__": rows = asyncio.run(main(sys.argv[1:])) with open("domains.csv", "w", newline="", encoding="utf-8") as f: w = csv.DictWriter(f, fieldnames=list(rows[0])) w.writeheader() for r in rows: w.writerow({k: "; ".join(v) if isinstance(v, list) else v for k, v in r.items()}) 

Related posts