# Email Authentication Auditor - SPF, DKIM, DMARC Fix Plan (`enbotix/email-authentication-auditor`) Actor

Grades a domain's email authentication (SPF, DKIM, DMARC, MX, blacklists, DNS) and returns the exact DNS records to publish to fix what is broken. Covers date-based DKIM selectors, distinguishes revoked keys from absent ones, and never proposes replacing a working SPF record.

- **URL**: https://apify.com/enbotix/email-authentication-auditor.md
- **Developed by:** [Enbo Tix](https://apify.com/enbotix) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 domain audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Email Authentication Auditor

Grades a domain's email authentication — **SPF, DKIM, DMARC, MX, blacklists, basic DNS** —
and returns **the exact DNS records to publish to fix what is broken**.

Most tools in this category tell you what is wrong. This one tells you what to type.

### Why this exists

Measured across the Apify Store: **394 monetised actors** in the email/DNS audit category,
**1.76M combined runs** — and every single one of them only *reads*. None of them automates
the fix. That is the gap this Actor fills.

A scan tells you "no DKIM key found". That sentence does not get your mail delivered. The
useful output is a record set you can publish, for the provider you actually use.

### What you get

Per domain, one row in the dataset:

| Field | What it means |
|---|---|
| `score` | 0–100 deliverability score (SPF 20, DMARC 25, DKIM 25, blacklists 20, MX 5, DNS 5) |
| `grade` | A–F |
| `checks` | Status of every check, `Name=status` |
| `actionable` | Every critical/high finding, with severity |
| `fix_provider` | The mail provider the fix plan is written for |
| `fix_spf` | The exact SPF TXT value to publish |
| `fix_dmarc` | The exact DMARC TXT value to publish |
| `fix_dkim_selector` | The DKIM selector the key belongs under |
| `fix_steps` | Ordered, unambiguous steps — each one actionable without interpretation |
| `fix_caution` | The warning that applies to this domain, if any |

### Example output

```json
{
  "domain": "example.com",
  "score": "75",
  "grade": "B",
  "summary": "Close - a couple of fixes will do it",
  "providers": "Google Workspace / Gmail",
  "checks": "SPF=pass; DMARC=pass; DKIM=critical; MX=pass; Blacklists=pass; Basic DNS=pass",
  "actionable": "[critical] DKIM: DKIM record(s) exist at 20230601 but the key is REVOKED (empty p=), so this domain is not signing new mail.",
  "fix_provider": "Google Workspace / Gmail",
  "fix_spf": "",
  "fix_dmarc": "",
  "fix_dkim_selector": "google._domainkey",
  "fix_dkim_note": "Enable DKIM in Google Admin > Apps > Gmail > Authenticate email, then send one test message so the key appears.",
  "fix_steps": "SPF already exists and was left untouched. A wrong SPF record locks a domain out of its own inbox. | Enable DKIM with Google Workspace / Gmail. Expect a TXT record at google._domainkey under _domainkey. | Re-run this audit after publishing.",
  "fix_caution": "SPF already exists and was left untouched. A wrong SPF record locks a domain out of its own inbox.",
  "report_url": "https://mailcluster.net/audit?domain=example.com"
}
```

### Accuracy: what this tool refuses to get wrong

A public scanner that renders verdicts about other people's configuration spends credibility
it cannot get back. It is correct on ordinary inputs and wrong on exactly the inputs people
check first. Four rules this Actor holds to, each one learned from a real failure:

**1. Date-based and rotating DKIM selectors are covered.**
Google publishes its key at `20230601._domainkey.google.com`, not `google._domainkey`. A fixed
selector list reports "no DKIM found" on one of the most famous domains on the internet. This
Actor scans 60 months of month-start selectors, so it finds keys that are years old.

**2. A wildcard `*._domainkey` record is detected, not believed.**
A wildcard makes *every* selector answer. Without a control query against a selector that
cannot exist, an auditor credits a guessed selector with a key it does not own — a false
pass. This Actor probes for the wildcard before trusting any DKIM result.

**3. A revoked key is not an absent key.**
A record with an empty `p=` is revoked: the infrastructure exists, the key is dead, and the
fix is different. This Actor reports the two cases separately instead of collapsing them
into "no DKIM found".

**4. A working SPF record is never proposed over.**
A wrong SPF record locks a domain out of its own inbox. When SPF already exists, this Actor
leaves it alone and says so, rather than handing you a value to paste that might break
deliverability you already have.

**Verified against known-good targets:** `microsoft.com`, `enbotix.com`, `github.com`,
`stripe.com`, `shopify.com` and `sendgrid.com` all score **100/A**. `mailcluster.net` scores
**28/D**. `google.com` scores **75/B** — correctly identifying a genuinely revoked key.

### Deliberate non-findings

`~all` in SPF is reported at **medium** severity, not as a failure. Most of the internet uses
it on purpose; a tool that cries wolf on a correct configuration loses its credibility.
`+all` (authorising the entire internet) **is** reported as high severity.

A generic DKIM selector (`mail`, `default`, `k1`, `s1`, `pm`, `smtp`, `email`) is treated as
evidence of nothing. Half the internet names its selector `mail`; inferring a provider from
it is a false positive.

### Input

```json
{ "domains": ["example.com", "mailcluster.net"] }
```

A comma-separated string also works. Up to 50 domains per run.

### Pricing

Pay per event — **$0.05 per domain audited**. You are never charged for a domain that could
not be audited.

### Built by

[mailcluster.net](https://mailcluster.net) — free email authentication audit, $29 one-off fix,
$19/month monitoring. Also available as a hosted API with automatic record application.

# Actor input Schema

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

One or more domain names to audit, for example \["example.com", "mailcluster.net"]. A comma-separated string also works. Up to 50 domains per run.

## Actor input object example

```json
{
  "domains": [
    "example.com"
  ]
}
```

# Actor output Schema

## `domain` (type: `string`):

The domain that was audited.

## `score` (type: `string`):

Deliverability score from 0 to 100, weighted across SPF (20), DMARC (25), DKIM (25), blacklists (20), MX (5) and basic DNS (5).

## `grade` (type: `string`):

Letter grade from the score: A (90+), B (70+), C (45+), D (20+) or F (below 20).

## `summary` (type: `string`):

One-line plain-language verdict on the domain's deliverability.

## `providers` (type: `string`):

Sending platforms detected from the SPF include list and MX records, comma separated. Empty if none was recognised.

## `checks` (type: `string`):

Status of every check, semicolon separated, in the form Name=status.

## `actionable` (type: `string`):

Every critical and high severity finding, each prefixed with its severity and the check it came from.

## `fix_provider` (type: `string`):

The mail provider the fix plan is written for, inferred from the SPF include list or a distinctive DKIM selector. Empty when no provider could be identified.

## `fix_spf` (type: `string`):

The exact SPF TXT value to publish. Empty when an SPF record already exists (it is deliberately never overwritten) or when no provider could be identified.

## `fix_dmarc` (type: `string`):

The exact DMARC TXT value to publish at \_dmarc.<domain>. Empty when a DMARC record already exists.

## `fix_dkim_selector` (type: `string`):

The DKIM selector the key should be published under, for example selector2.\_domainkey. Empty when no provider could be identified.

## `fix_dkim_note` (type: `string`):

Where in the provider's admin console the DKIM key is created, and what to do about an existing revoked key.

## `fix_steps` (type: `string`):

The ordered list of actions to fix the domain, separated by | . Steps are written so each one can be done without interpretation.

## `fix_caution` (type: `string`):

The warning that applies to this domain, if any. A working SPF record is never overwritten, because a wrong SPF locks a domain out of its own inbox.

## `report_url` (type: `string`):

Link to the full HTML report for this domain.

# 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": [
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("enbotix/email-authentication-auditor").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": ["example.com"] }

# Run the Actor and wait for it to finish
run = client.actor("enbotix/email-authentication-auditor").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": [
    "example.com"
  ]
}' |
apify call enbotix/email-authentication-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,enbotix/email-authentication-auditor"
        }
    }
}
```

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/0yRRBKdhvVvqW3xwG/builds/jYxDlPmCXbNf1HVap/openapi.json
