# Domain Email Security Checker: SPF, DMARC, DKIM, MX (`dodge_bot/domain-email-security`) Actor

Check any list of domains for email authentication and spoofing protection: SPF (including +all and the 10-lookup limit), DMARC policy and reporting, DKIM keys on 30 common selectors, MX and mail provider, MTA-STS, TLS-RPT and BIMI. A-F grade and a plain list of issues per domain.

- **URL**: https://apify.com/dodge\_bot/domain-email-security.md
- **Developed by:** [Dodge Sucharda](https://apify.com/dodge_bot) (community)
- **Categories:** Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Domain Email Security Checker: SPF, DMARC, DKIM, MX

Check a list of domains for email authentication and spoofing protection in one run. For each domain you get an A-F grade, a plain-English list of problems, and the raw records: SPF, DMARC, DKIM (on 30 common selector names), MX and mail provider, MTA-STS, TLS-RPT and BIMI.

**$3 per 1,000 domains.** A domain that does not exist is a valid result (grade F). Invalid input and DNS outages are free.

### Good for

- **Deliverability audits**: find why a client's email lands in spam
- **Security and IT agencies**: find prospects whose domains can be spoofed (no DMARC, or p=none)
- **Vendor and supply-chain checks**: review suppliers' email protection
- **Monitoring your own domains** after DNS changes

### What is checked

| Area | Checks |
|---|---|
| SPF | Present, only one record, ends in `-all`/`~all` (flags `+all` and `?all`), top-level DNS lookups against the limit of 10, includes |
| DMARC | Present, valid policy, `p=none` (monitoring only), `pct` below 100, aggregate reports (`rua`) set |
| DKIM | Keys found on 30 common selectors (Google, Microsoft 365, SendGrid, Mailchimp/Mandrill, Amazon SES, Zoho, Fastmail, HubSpot and more), key type and approximate size, revoked keys |
| MX | Mail servers, detected provider (Google Workspace, Microsoft 365, Proofpoint, Mimecast and others), null MX |
| Extras | MTA-STS, TLS-RPT, BIMI |

Grade: **A** no problems; **B** one warning; **C** two or more warnings; **D** one error; **F** two or more errors, or the domain does not exist.

### Output (one row per domain; real result for example.com, shortened)

```json
{
  "domain": "example.com",
  "status": "ok",
  "exists": true,
  "grade": "A",
  "errors": 0,
  "warnings": 0,
  "issues": [
    {"severity": "notice", "code": "dmarc_no_reports", "message": "DMARC has no rua= address, so no aggregate reports are collected."},
    {"severity": "notice", "code": "null_mx", "message": "Null MX: the domain states it never receives email."}
  ]
}
```

Each row also includes the raw `spfRecord`, `dmarcRecord`, `mx`, `dkim`, `nameservers` and more.

### Limits

- DKIM selectors can't be listed from DNS, so only 30 common names are tried. "Not found" can mean the domain uses a custom selector; it is reported as a notice, not an error.
- The SPF lookup count covers the top-level record, not every nested include.
- It only reads public DNS. No emails are sent and no servers are probed.

# Actor input Schema

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

Domains, URLs or email addresses (the domain is taken from each). Up to 20,000 per run.

## Actor input object example

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

# Actor output Schema

## `overview` (type: `string`):

No description

## `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",
        "apify.com",
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dodge_bot/domain-email-security").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",
        "apify.com",
        "example.com",
    ] }

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

```

## MCP server setup

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

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/D1C3VYxdl12UC3EBw/builds/TsGdUhcGj0dckEMzD/openapi.json
