# DNS Email Security Checker (`snappytools/dns-email-security-checker`) Actor

Give it a domain and it looks up the SPF, DKIM, DMARC and MX records in public DNS, then grades the email authentication setup from A to F with a plain list of what is wrong. You type in a list of domains (or links, or email addresses) and get back one row per domain, in the same order.

- **URL**: https://apify.com/snappytools/dns-email-security-checker.md
- **Developed by:** [Snappy](https://apify.com/snappytools) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.90 / 1,000 results

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

## DNS Email Security Checker – SPF, DKIM and DMARC check for any domain

Give this DNS email security checker a domain and it looks up the SPF, DKIM, DMARC and MX records in public DNS, then grades the email authentication setup from A to F.

You type in a list of domains (or links, or email addresses) and get back one row per domain, in the same order. Each row has the `grade`, a `score` out of 100, the raw `spfRecord` and `dmarcRecord`, the `spfAllQualifier`, the `dmarcPolicy`, the DKIM selectors it found and an `issues` list in plain English that you can act on straight away.

Run it on a schedule to catch a domain whose DMARC policy was loosened or whose SPF record broke.

### Why this one

- **One row per domain, always.** A bad or missing domain gets its own row with a `status` and a `reason`, so one typo never loses the rest of the run.
- **Answers from real DNS.** Every lookup goes to Cloudflare's public DNS over HTTPS resolver, and the raw records are in the output so you can check them yourself.
- **Issues in plain English.** You get lines like "SPF ends with ~all (soft fail)", not just a number.
- **Your own DKIM selectors.** Add the selectors your mail provider uses, or leave the field empty to try a standard list.
- **Cheap.** $2.90 per 1,000 results, and runs with no results cost nothing.

### Quick start

```json
{
  "domains": ["google.com", "github.com", "cloudflare.com"]
}
```

This returns one row per domain, each with a grade, a score, the raw records and any issues.

### What you can use it for

| Who | What for |
|---|---|
| Email deliverability consultants | Audit a new client's sending domains before a campaign |
| IT and security teams | Check every company domain, including parked ones, for spoofing gaps |
| MSPs | Run a regular check across customer domains and report changes |
| Sales teams selling email tools | Find prospects with no DMARC or a weak policy |

### How to use it

1. Click **Try for free**.
2. In **Domains**, add one domain per line, for example `example.com`. Links and email addresses work too, and are cut down to the domain.
3. If you know the DKIM selector your mail provider uses, add it to **DKIM selectors**, for example `selector1`. Otherwise leave it empty.
4. Click **Start**.
5. To watch for changes, save the input and run it from **Schedules** every day or week.

### What data you get

Each row describes one input value.

| Field | What it is | Example |
|---|---|---|
| `id` | The domain checked, lower case | `github.com` |
| `input` | The value you passed in | `github.com` |
| `status` | `ok`, `invalid`, `not_found` or `error` | `ok` |
| `reason` | Why a row is not `ok`, otherwise empty | `null` |
| `domain` | The cleaned domain | `github.com` |
| `url` | https link to the domain | `https://github.com` |
| `grade` | Grade from A to F | `B` |
| `score` | Score from 0 to 100 | `85` |
| `hasMx` | Whether the domain has MX records | `true` |
| `mxHosts` | Mail server hosts | `["github-com.mail.protection.outlook.com"]` |
| `spfRecord` | The SPF record found | `v=spf1 include:_spf.google.com ~all` |
| `spfAllQualifier` | How the SPF record ends | `~all` |
| `spfLookupCount` | DNS-lookup terms in SPF (the limit is 10) | `8` |
| `dmarcRecord` | The DMARC record found | `v=DMARC1; p=reject; rua=mailto:mailauth-reports@google.com` |
| `dmarcPolicy` | `none`, `quarantine` or `reject` | `quarantine` |
| `dmarcPct` | Share of mail the policy applies to | `100` |
| `dmarcRua` | Where aggregate reports go | `mailto:dmarc@github.com` |
| `dkimSelectorsFound` | Selectors with a DKIM key | `["google", "selector1", "k1"]` |
| `issues` | Plain-English problems found | `["SPF ends with ~all (soft fail)"]` |
| `checkedAt` | When it was checked, ISO 8601 | `2026-11-18T09:34:07.282Z` |
| `source` | Resolver name and a link to the DMARC lookup | `{ "name": "Cloudflare DNS over HTTPS" }` |

In a test run on 18 Nov 2026, google.com scored 75 (grade B) and github.com scored 85 (grade B). Both were marked down for an SPF record ending in `~all`.

### Pricing

| Event | Price |
|---|---|
| Result (one per domain) | $0.0029 |

| Run | Cost |
|---|---|
| 100 results | $0.29 |
| 1,000 results | $2.90 |
| 10,000 results | $29.00 |

There is no start fee. Runs with no results cost nothing.

### Good to know

- **Limits:** up to 200 domains and 20 DKIM selectors per run.
- **Where the data comes from:** public DNS, through Cloudflare's DNS over HTTPS resolver. No login, no private data.
- **DKIM depends on selectors:** DNS can't list selectors, so the checker only finds keys under the ones it tries. A missing DKIM key may just mean a selector it didn't try.
- **Freshness:** answers are live at run time, but DNS caching means a change made minutes ago may not show yet.
- **Not affiliated:** this tool isn't affiliated with or endorsed by Cloudflare or any domain owner checked.

### FAQ

**How do I check SPF, DKIM and DMARC for many domains at once?**
Paste them into **Domains**, up to 200 per run, and you get one graded row per domain in the same order.

**Why is DKIM missing for a domain I know signs mail?**
Its selector is probably not in the list tried. Add it to **DKIM selectors**.

**Can I pass full links or email addresses?**
Yes. They are cut down to the domain, and `input` keeps what you sent.

**Can I export the results to Excel or CSV?**
Yes. Download them from the Output tab in Excel, CSV or JSON.

### Getting the data out

Download the results as Excel, CSV or JSON from the Output tab. Send them to Google Sheets, Slack, Zapier, Make or webhooks from the **Integrations** tab. Every run is available through the Apify API, and you can run it on a timetable from **Schedules**.

### Questions or problems

Open an issue on the **Issues** tab and include the run link. I reply within one business day.

### Related tools

- [Bulk Email Syntax and MX Validator](https://apify.com/snappytools/email-syntax-mx-validator): check email addresses for syntax and mail servers

# Actor input Schema

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

Domain names to check, one per line, for example example.com. Links like https://www.example.com/page and email addresses like name@example.com are cut down to the domain. Up to 200 per run.

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

Optional DKIM selectors to look up at <selector>.\_domainkey.<domain>, for example google or selector1. Leave empty to try a standard list of common selectors. Up to 20.

## Actor input object example

```json
{
  "domains": [
    "google.com",
    "github.com",
    "cloudflare.com"
  ]
}
```

# 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": [
        "google.com",
        "github.com",
        "cloudflare.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("snappytools/dns-email-security-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": [
        "google.com",
        "github.com",
        "cloudflare.com",
    ] }

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

```

## MCP server setup

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