# Email Auth Check: SPF, DMARC & DKIM Anti-Spoofing (`centorprat/email-auth-dmarc-spf-check`) Actor

Give it domains. For each it reads SPF, DMARC, DKIM and MX over keyless DNS-over-HTTPS and composes an anti-spoofing posture with specific findings and a signal (protected / mostly-protected / monitoring-only / spoofable / no-email-configured). Read-only DNS, agent-callable.

- **URL**: https://apify.com/centorprat/email-auth-dmarc-spf-check.md
- **Developed by:** [Centor Prat](https://apify.com/centorprat) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $17.00 / 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

## Email Auth Check: SPF, DMARC & DKIM Anti-Spoofing

**Find out if someone can spoof email from your domain.** Give it domains; for each it reads the **SPF**,
**DMARC** and **DKIM** records (and MX) over keyless DNS-over-HTTPS and composes an **anti-spoofing
posture** with specific, actionable findings and a clear signal. Keyless, agent-callable, built to answer
*"is my domain protected against email spoofing, and what's missing?"*

> 🔎 **Read-only DNS.** It queries public DNS over DoH — it never contacts the domain's mail servers. DKIM
> is probed against common selectors, so absence here isn't proof DKIM is unused. Signals for review.

### ⚡ Why it's useful

Email spoofing and phishing abuse domains with weak authentication. This checks the three records that
stop it — SPF (who may send), DKIM (cryptographic signing), DMARC (enforcement + reporting) — and tells
you exactly what's missing, in one call across every domain you own.

### 📋 What each report contains

| Field | Meaning |
|---|---|
| `signal` | `protected` / `mostly-protected--review` / `monitoring-only--not-enforced` / `spoofable--add-dmarc-enforcement` / `spoofable--no-email-auth` / `no-email-configured` |
| `spf` | present, the record, the `all` qualifier (`-all`/`~all`/`+all`), lookup count, issues |
| `dmarc` | present, policy (`p=none/quarantine/reject`), `pct`, `rua`, issues |
| `dkim` | selectors checked and selectors with a live key |
| `mxPresent` / `findings` | whether email is configured, and the specific problems found |

### 📥 Input

```json
{ "domains": ["example.com", "your-brand.org"], "dkimSelectors": ["google", "k1"] }
```

Leave `dkimSelectors` empty to use a common default set. One report per domain.

### 📤 Example output (real run, trimmed)

```json
{ "domain": "apify.com", "signal": "protected",
  "spf": { "present": true, "allQualifier": "-all" },
  "dmarc": { "present": true, "policy": "reject", "pct": "100" },
  "dkim": { "selectorsFound": ["google"] }, "mxPresent": true, "findings": [] }
```

In the same run `example.com` returned `mostly-protected--review` (SPF `-all` + DMARC `reject`, but no
live DKIM for the common selectors), and `github.com` / `paypal.com` returned `protected`.

### 💰 Pricing (pay-per-event)

- **Domain checked — $0.02** per domain.

### 💡 Use cases

- **IT / security:** confirm SPF + DMARC enforcement + DKIM across every domain you own, and catch `p=none`.
- **Deliverability / marketing:** weak auth sends your mail to spam — this pinpoints the gap.
- **Agencies / MSPs / M\&A due diligence:** audit a whole portfolio's email security fast.
- **Agents:** callable as an MCP tool — give it domains, get back an anti-spoofing posture.

### 🔑 Keyless & agent-callable

No API keys, no accounts, no paid child Actors — just public DNS over DoH.

### 🚀 Ready-made tasks (one click)

- [DMARC Checker - Policy, Reporting & Enforcement](https://apify.com/centorprat/email-auth-dmarc-spf-check/examples/dmarc-checker)

### 🤖 For AI agents (MCP)

```
https://mcp.apify.com/?tools=actors,docs,centorprat/email-auth-dmarc-spf-check
```

Loads as `centorprat--email-auth-dmarc-spf-check`. Claude Code:

```
claude mcp add apify -- npx -y @apify/actors-mcp-server --actors centorprat/email-auth-dmarc-spf-check
```

# Actor input Schema

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

Domains to check, e.g. \["example.com", "your-brand.org"]. One posture report per domain.

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

Which DKIM selectors to check at <selector>.\_domainkey.<domain>. Defaults to a set of common selectors (google, default, selector1/2, s1/2, k1, ...). Add your own if you use a custom selector.

## `onlyProblems` (type: `boolean`):

On: return only domains that aren't fully protected (ideal for scheduled alerting).

## `webhookUrl` (type: `string`):

If set, domains needing attention are POSTed here as JSON.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com"
  ],
  "onlyProblems": false
}
```

# Actor output Schema

## `domains` (type: `string`):

One posture per domain: a signal (protected / mostly-protected / monitoring-only / spoofable / no-email-configured), the SPF record and its 'all' qualifier and lookup count, the DMARC policy/pct/rua, the DKIM selectors found, whether MX is present, and specific findings. Read-only DNS.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("centorprat/email-auth-dmarc-spf-check").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",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("centorprat/email-auth-dmarc-spf-check").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"
  ]
}' |
apify call centorprat/email-auth-dmarc-spf-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,centorprat/email-auth-dmarc-spf-check"
        }
    }
}
```

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/eDX6VvBIjwyVjE1Gh/builds/6WFpQbeqBPfbFo3ta/openapi.json
