# SPF, DKIM & DMARC Checker: Bulk Domain Email Auth Audit (`actose/email-dns-auth-checker`) Actor

Audit email authentication for thousands of domains: SPF (lookups, all), DMARC (policy, rua, pct), DKIM keys (45 selectors), MX provider, BIMI, MTA-STS, A-F score and fixes. Change alerts. No API key, no login. MCP-ready for AI agents. Errors are free. $3 per 1,000 domains

- **URL**: https://apify.com/actose/email-dns-auth-checker.md
- **Developed by:** [ABM](https://apify.com/actose) (community)
- **Categories:** Developer tools, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.55 / 1,000 domain checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SPF, DKIM & DMARC Checker (Bulk Domain Email Authentication Audit)

**Price: $3 per 1,000 domains ($0.003 per domain checked). Errors, non-existent domains and unchanged domains are free.**

Check the email authentication of hundreds or thousands of domains in one run. For every domain the actor reads public DNS and returns:

- **SPF**: record, `all` qualifier (`-all`, `~all`...), number of DNS lookups (RFC 7208 limit of 10, includes followed recursively), includes, duplicates, deprecated `ptr`.
- **DMARC**: record, policy (`p`), subdomain policy (`sp`), `pct`, aggregate (`rua`) and forensic (`ruf`) report addresses, alignment (`adkim`, `aspf`), inherited policy from the parent domain.
- **DKIM**: tests ~45 common selectors (Google Workspace, Microsoft 365, Mailchimp/Mandrill, SendGrid, Zoho, Proton, Fastmail, Mailjet, HubSpot, iCloud...) plus your own; key type, key size, revoked keys, test mode.
- **MX**: records, priorities, detected mail provider (Google, Microsoft 365, Proofpoint, Mimecast...), null MX.
- **BIMI** (logo and VMC URLs), **MTA-STS** and **TLS-RPT**.
- A **score (0-100) and grade (A-F)**, a list of **issues** by severity and **concrete fixes** in plain English, plus a ready-to-paste **Markdown summary** for reports and LLMs.
- **Change monitoring**: schedule it and get only the domains whose SPF, DMARC, DKIM or MX changed.

No API key, no login, no website scraping: everything is read from public DNS over HTTPS, so results are fast and reliable.

### How much does it cost?

Pay per result, no monthly rental. One event `domain-checked` = $0.003.

| Domains | Price |
|---|---|
| 100 | $0.30 |
| 1,000 | $3.00 |
| 10,000 | $30.00 |

Not charged: invalid inputs, duplicates, domains that do not exist (NXDOMAIN), DNS errors, and domains skipped as unchanged in `onlyChanges` mode. You can set a maximum spend per run; the actor stops cleanly when it is reached.

### Input

```json
{
  "domains": ["stripe.com", "example.org", "john@acme-corp.com", "https://www.shopify.com/pricing"],
  "dkimSelectors": ["s2048"],
  "checkCommonDkimSelectors": true,
  "monitorChanges": false,
  "onlyChanges": false,
  "monitorName": "default",
  "maxConcurrency": 8
}
```

- `domains` (required): domains, email addresses or URLs. IDN (`bücher.de`) supported. Duplicates are checked once.
- `dkimSelectors`: your own selectors (look for `s=` in the `DKIM-Signature` header of an email you sent).
- `monitorChanges`: keep a snapshot between runs and add `changed` / `changes` to each result.
- `onlyChanges`: output and charge only new or changed domains (for scheduled runs).
- `monitorName`: separate saved states, e.g. one per client.

### Output

One object per domain in the dataset (shortened example):

```json
{
  "domain": "stripe.com",
  "inputValue": "stripe.com",
  "score": 93,
  "grade": "A",
  "spfRecord": "v=spf1 include:_spf.google.com include:mail.stripe.com ... ~all",
  "spfValid": true,
  "spfAllQualifier": "~all",
  "spfDnsLookups": 9,
  "spfIncludes": ["_spf.google.com", "mail.stripe.com"],
  "dmarcRecord": "v=DMARC1; p=reject; pct=100; fo=1; rua=mailto:...; ruf=mailto:...",
  "dmarcPolicy": "reject",
  "dmarcPct": 100,
  "dmarcRua": ["mailto:dmarc@stripe.com"],
  "dkimSelectorsFound": ["google"],
  "dkimKeys": [{"selector": "google", "keyType": "rsa", "keyBits": 2048, "revoked": false, "testMode": false, "record": "v=DKIM1; k=rsa; p=MIIB..."}],
  "mxRecords": [{"priority": 1, "host": "aspmx.l.google.com"}],
  "mxProvider": "Google Workspace",
  "nullMx": false,
  "bimiRecord": null,
  "mtaStsRecord": "v=STSv1; id=...",
  "tlsRptRecord": null,
  "issues": [{"severity": "info", "area": "SPF", "message": "..."}],
  "recommendations": ["Your DMARC policy qualifies for BIMI: publish default._bimi with your SVG logo."],
  "summaryMarkdown": "## stripe.com — email authentication grade A (93/100)\n- SPF: ...",
  "isNew": null,
  "changed": null,
  "changes": null,
  "checkedAt": "2026-10-21T08:00:00+00:00"
}
```

Values above are illustrative; the actor returns the live DNS values. In the Console, the **Overview** table shows domain, grade, score, SPF, DMARC, DKIM, provider and fixes; export as JSON, CSV, Excel or HTML.

With monitoring on, a changed domain looks like:

```json
{"domain": "acme-corp.com", "changed": true, "changes": [{"field": "dmarcRecord", "previous": "v=DMARC1; p=none; rua=mailto:d@acme-corp.com", "current": "v=DMARC1; p=quarantine; rua=mailto:d@acme-corp.com"}]}
```

### Use cases

#### 1. MSP / IT provider: weekly audit of all client domains

An MSP manages 120 client domains and must catch broken SPF (more than 10 lookups after adding a new SaaS) before mail starts bouncing. Every Monday a schedule runs:

```json
{"domains": ["client-a.com", "client-b.fr", "client-c.de"], "monitorChanges": true, "onlyChanges": true, "monitorName": "msp-clients"}
```

Output: only the domains that changed, e.g. `{"domain": "client-b.fr", "changed": true, "spfDnsLookups": 12, "spfValid": false, "recommendations": ["Reduce SPF DNS lookups to 10 or fewer..."]}`. A Make scenario sends each changed domain to the ticketing tool. Cost for a typical week (5 changes): $0.015.

#### 2. Cold-email / deliverability agency: pre-flight check of sending domains

Before warming up 40 new sending domains, an agency checks they all have SPF, DKIM and DMARC with reports:

```json
{"domains": ["getacme.io", "tryacme.io", "acmehq.co"], "dkimSelectors": ["s1", "google"]}
```

Output: `{"domain": "tryacme.io", "grade": "D", "dmarcRecord": null, "dkimSelectorsFound": [], "recommendations": ["Publish a DMARC TXT record at _dmarc.tryacme.io ...", "Enable DKIM signing ..."]}`. The team filters `grade != "A"` in Google Sheets and fixes those domains first. 40 domains = $0.12.

#### 3. Sales / lead generation: security posture of 10,000 prospects

A security vendor selling DMARC services scores a prospect list exported from the CRM:

```json
{"domains": ["prospect1.com", "prospect2.com", "..."], "maxConcurrency": 20}
```

Output: `{"domain": "prospect2.com", "dmarcPolicy": "none", "dmarcRua": [], "mxProvider": "Microsoft 365", "score": 48}`. Prospects with `dmarcPolicy` `none` or missing go into an outreach sequence personalized with `summaryMarkdown`. 10,000 domains = $30.

#### 4. Security team: brand protection on look-alike and parked domains

Parked domains should send nothing: SPF `v=spf1 -all`, DMARC `p=reject`, null MX. Input the 300 defensive registrations and keep those not graded A.

### Call it from the API

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("<USERNAME>/email-dns-auth-checker").call(run_input={"domains": ["stripe.com", "example.org"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["domain"], item["grade"], item["dmarcPolicy"], item["recommendations"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('<USERNAME>/email-dns-auth-checker').call({ domains: ['stripe.com', 'example.org'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((i) => console.log(i.domain, i.grade, i.spfDnsLookups));
```

Synchronous HTTP (small lists): `POST https://api.apify.com/v2/acts/<USERNAME>~email-dns-auth-checker/run-sync-get-dataset-items?token=<APIFY_TOKEN>` with the input JSON as body.

### Integrations (Make, Zapier, n8n, Google Sheets)

- **n8n / Make**: "Run actor" node with `{"domains": {{ $json.domains }}, "monitorChanges": true, "onlyChanges": true}`, then "Get dataset items", then filter `changed = true` and post to Slack or e-mail.
- **Zapier**: trigger "New row in Google Sheets" → Apify "Run actor" with the domain → write `grade` and `recommendations` back to the row.
- **Google Sheets**: use the Apify Google Sheets integration on the run to export the Overview view directly.
- **Schedules**: Apify Console → Schedules → weekly run with `onlyChanges: true` for DNS change alerts.

### Use with AI agents (MCP)

The actor works as a tool for Claude, Cursor, ChatGPT and other agents through the Apify MCP server (`https://mcp.apify.com`, add the actor `email-dns-auth-checker`). An agent can ask "Is acme.com protected against spoofing?" and get structured JSON plus `summaryMarkdown`, a short Markdown report with numbered fixes that can be quoted directly in an answer.

### FAQ

**How is DKIM found?** DKIM keys live at `<selector>._domainkey.<domain>` and DNS cannot list selectors. The actor tests ~45 common selectors; if you use a custom one, add it in `dkimSelectors`. "No DKIM found" is reported as *info*, not as proof that DKIM is missing.

**Which DNS servers are used?** Public DNS-over-HTTPS resolvers (Google, with Cloudflare as fallback, with retries). Results reflect what the internet sees, not your local cache.

**Does it send emails or connect to mail servers?** No. It only reads public DNS records. No SMTP connection, no login.

**How is the score computed?** SPF 25 points, DMARC 35 (reject > quarantine > none, rua), DKIM 20 (2048-bit key gets full points), MX 10, BIMI/MTA-STS/TLS-RPT 10. Domains that send no email (null MX or `v=spf1 -all`) are not penalized for missing DKIM or BIMI.

**What about subdomains?** If a subdomain has no DMARC record, the actor walks up to the parent domain and reports the inherited policy (`dmarcSource`).

**Is a domain without MX an error?** No, it is a valid result (charged) with an MX issue. Only non-existent domains are free.

### Limits

- DKIM detection is limited to common and user-supplied selectors.
- The MTA-STS policy file (HTTPS) is not downloaded; only the `_mta-sts` TXT record is checked. BIMI logos and VMC certificates are not validated.
- Organizational domain detection walks up DNS labels without the Public Suffix List; for rare multi-level suffixes the inherited DMARC source may differ from what a receiver uses.
- SPF lookup counting follows `include` and `redirect` up to 10 levels; macros (`%{...}`) are not expanded.
- DNS answers can be cached by resolvers for the record TTL: a change you just made may appear on the next run.

# Actor input Schema

## `domains` (type: `array`):

Domains to check. Email addresses (john@acme.com) and URLs (https://www.acme.com/page) are accepted and reduced to the domain. Internationalized domains (café.fr) are supported. Duplicates are checked once.

## `dkimSelectors` (type: `array`):

Your own DKIM selectors to test in addition to the common ones (e.g. "s2048", "mailchimp"). Find it in the DKIM-Signature header (s=) of an email you sent.

## `checkCommonDkimSelectors` (type: `boolean`):

Test about 45 common selectors (Google Workspace, Microsoft 365, Mailchimp, SendGrid, Zoho, Proton, Fastmail, Mailjet, HubSpot...).

## `monitorChanges` (type: `boolean`):

Remember each domain's records between runs and add "changed" + "changes" (field, previous, current) to every result. Use it with a schedule to be alerted when SPF, DMARC, DKIM or MX change.

## `onlyChanges` (type: `boolean`):

With monitoring: output (and charge) only domains seen for the first time or whose records changed since the last run. Unchanged domains are free.

## `monitorName` (type: `string`):

Name of the saved state, so that several schedules (e.g. one per client) do not mix. Letters, digits and - only.

## `maxConcurrency` (type: `integer`):

How many domains are checked at the same time.

## Actor input object example

```json
{
  "domains": [
    "stripe.com",
    "example.org",
    "github.com"
  ],
  "dkimSelectors": [],
  "checkCommonDkimSelectors": true,
  "monitorChanges": false,
  "onlyChanges": false,
  "monitorName": "default",
  "maxConcurrency": 8
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsJson` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "stripe.com",
        "example.org",
        "github.com"
    ],
    "dkimSelectors": [],
    "monitorName": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("actose/email-dns-auth-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "domains": [
        "stripe.com",
        "example.org",
        "github.com",
    ],
    "dkimSelectors": [],
    "monitorName": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("actose/email-dns-auth-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "stripe.com",
    "example.org",
    "github.com"
  ],
  "dkimSelectors": [],
  "monitorName": "default"
}' |
apify call actose/email-dns-auth-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actose/email-dns-auth-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/yszWVHEz1hBI1iNsm/builds/zGkbHtuu3iy3018yj/openapi.json
