# SPF, DKIM & DMARC Checker - Bulk Email Authentication Audit (`extas_corp/email-auth-checker`) Actor

Audit the email authentication of thousands of domains from public DNS: SPF (with the 10-lookup limit), DMARC policy, DKIM selectors, MTA-STS, TLS-RPT, BIMI and MX. A score, a grade and a plain list of issues per domain. No login, no browser, no proxy.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Email Authentication Audit

Paste a list of domains and get, for each one, **how well its email is protected against spoofing and how likely its mail is to be rejected**: SPF, DMARC, DKIM, MTA-STS, TLS-RPT, BIMI and MX, a score out of 100, a grade (A to F) and a plain-English list of issues.

Everything comes from public DNS (plus the public MTA-STS policy file). No login, no browser, no proxy, no e-mail is sent.

- **SPF**: the record, its final `all` qualifier, and the **total number of DNS lookups** after following every `include:` and `redirect=` (receivers reject SPF above 10, a common silent failure). Several SPF records, loops and broken includes are reported.
- **DMARC**: policy (`none` / `quarantine` / `reject`), subdomain policy, `pct`, alignment, and the **domains** that receive aggregate reports (the local part of report addresses is masked: `mailto:*@domain`)
- **DKIM**: which selectors publish a key, from 19 common ones (Google Workspace, Microsoft 365, Mailchimp/Mandrill, Amazon SES, Zoho, Proton...) or your own list. Revoked keys (empty `p=`) do not count.
- **MTA-STS** record and policy mode (`enforce` / `testing` / `none`), **TLS-RPT**, **BIMI** record and logo URL
- **MX** hosts with priorities (a null MX is shown as an empty host)
- One `ok` column for filtering and alerts: exactly one SPF record ending in `-all` or `~all` within 10 lookups, and a DMARC policy of `quarantine` or `reject`
- A domain that does not exist or does not answer gets `error` and never stops the run
- **Free during launch**: no per-domain fee at the moment, you only pay Apify platform usage (covered by the Free plan's monthly credit for normal use).

### Input example

```json
{
  "domains": ["apify.com", "https://www.wikipedia.org/", "someone@example.com"],
  "dkimSelectors": []
}
```

URLs and e-mail addresses are accepted: only the domain is used. Leave `dkimSelectors` empty to try the common ones.

### Example output

A well configured domain (real run, MX list shortened):

```json
{
  "domain": "apify.com",
  "ok": true,
  "score": 100,
  "grade": "A",
  "issues": ["SPF uses 10 of the 10 allowed DNS lookups: one more include will break it"],
  "error": null,
  "mx": [{"priority": 1, "host": "aspmx.l.google.com"}, {"priority": 5, "host": "alt1.aspmx.l.google.com"}],
  "spf": {
    "record": "v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com include:19497222.spf05.hubspotemail.net -all",
    "records": 1,
    "all": "-all",
    "lookups": 10,
    "errors": []
  },
  "dmarc": {
    "record": "v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:*@apify.com; ri=604800",
    "records": 1,
    "policy": "reject",
    "subdomainPolicy": "reject",
    "pct": 100,
    "reportDomains": ["apify.com"],
    "alignmentSpf": "r",
    "alignmentDkim": "r"
  },
  "dkim": {"checked": ["google", "selector1", "..."], "found": ["google"]},
  "mtaSts": {"record": "v=STSv1; id=29919a352ef9476a", "policyMode": "enforce"},
  "tlsRpt": "v=TLSRPTv1; rua=mailto:*@apify.com",
  "bimi": {
    "record": "v=BIMI1;l=https://apify.com/ext/apify-bimi-logo.svg;a=https://apify.com/ext/apify-bimi-certificate.pem;avp=personal",
    "logo": "https://apify.com/ext/apify-bimi-logo.svg"
  }
}
```

A domain that receives mail but publishes no SPF and no DMARC (real run, shortened):

```json
{
  "domain": "badssl.com",
  "ok": false,
  "score": 30,
  "grade": "F",
  "issues": [
    "no SPF record",
    "no DMARC record",
    "no DKIM key on the selectors tried (the domain may use another selector)",
    "no MTA-STS (optional): inbound mail TLS is not enforced"
  ],
  "error": null,
  "mx": [{"priority": 5, "host": "gmr-smtp-in.l.google.com"}]
}
```

A domain that does not exist: `{"domain": "...", "ok": false, "error": "domain does not exist (NXDOMAIN)"}`.

### Score

Starts at 100. Missing or duplicated SPF: -30. SPF ending in `+all` or with no `all`: -20, `?all`: -10. More than 10 SPF lookups: -20. Missing, duplicated or invalid DMARC: -30. DMARC `p=none`: -15. `pct` below 100: -5. No `rua`: -5. No DKIM key on the selectors tried: -10 (not applied to domains that declare they send no mail with `v=spf1 -all`). MTA-STS is reported but never lowers the score. Grade: A 90+, B 75+, C 60+, D 40+, F below.

### Use cases

- **Deliverability checks** before a campaign: catch an SPF over 10 lookups or a missing DMARC before Gmail and Yahoo reject the mail
- **Agencies, MSPs and IT providers**: audit every client domain in one run, export to CSV or Excel
- **Monitoring**: schedule it weekly and alert when `ok` turns false (someone added one include too many)
- **Security reviews and vendor checks**: which suppliers can be spoofed (no DMARC enforcement)
- **Sales qualification for email and security services**: find the domains that need help, from public DNS only

### Integrations

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("extas_corp/email-auth-checker").call(run_input={"domains": ["example.com"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["domain"], item.get("grade"), item.get("issues"), item["error"])
```

Results can be exported as CSV, Excel or JSON from the dataset, or pushed to Google Sheets, Make, Zapier or n8n.

### Limits

- **DKIM selectors cannot be listed from DNS.** If a domain signs with a selector that is not in the list, it is reported as "no DKIM key on the selectors tried". Add the selector (found in the `DKIM-Signature: s=` header of one of its e-mails) to `dkimSelectors`.
- SPF macros (`%{i}`) are counted as one lookup but not followed. When SPF uses `redirect=`, `all` shows `redirect` and the target's own qualifier is not graded.
- It reads DNS records; it does not send mail, test SMTP servers, check blocklists or verify that DKIM signatures actually validate.
- DMARC is read on the exact name you give. For a subdomain without its own record, receivers fall back to the parent domain's DMARC: check the parent too.
- DNS answers are those seen from Apify's resolver at run time; a record changed minutes ago may not be visible yet.

### FAQ

**Does it need a proxy or a browser?** No. A few DNS questions per domain, plus one HTTPS request to the MTA-STS policy file when the domain has an MTA-STS record.

**Why "no DKIM key" when the domain does use DKIM?** See the first limit: the selector name is not public. Add it to `dkimSelectors`.

**Does it collect personal data?** No. It reads public DNS records of domains. The local part of DMARC and TLS-RPT report addresses is masked, only their domain is shown.

**Do I need to pay to try it?** The Apify Free plan includes monthly platform credit, enough to check thousands of domains.

# Actor input Schema

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

One domain per line: example.com. A URL or an e-mail address also works (only the domain is used). Duplicates are checked once.

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

DKIM keys can only be found if you know their selector name. Leave empty to try 19 common ones (google, selector1, selector2, k1, s1, default, mandrill, amazonses...). Up to 50.

## `concurrency` (type: `integer`):

How many domains are checked at the same time (1-50).

## `timeoutSecs` (type: `integer`):

Give up on one DNS question after this many seconds.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "wikipedia.org"
  ],
  "concurrency": 10,
  "timeoutSecs": 10
}
```

# Actor output Schema

## `results` (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": [
        "apify.com",
        "github.com",
        "wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("extas_corp/email-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": [
        "apify.com",
        "github.com",
        "wikipedia.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("extas_corp/email-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": [
    "apify.com",
    "github.com",
    "wikipedia.org"
  ]
}' |
apify call extas_corp/email-auth-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,extas_corp/email-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/aKR2huLbZdVAtiOIy/builds/SNU9ciHFh4OfWODOF/openapi.json
