# Email Domain Security Audit (SPF, DKIM, DMARC, MX) (`evaluative_windbreak/email-domain-security-audit`) Actor

Audit email security for any list of domains: SPF, DKIM, DMARC, MX, MTA-STS and TLS-RPT checks with a 0-100 score, grade and a plain list of issues to fix.

- **URL**: https://apify.com/evaluative_windbreak/email-domain-security-audit.md
- **Developed by:** [Data Tools Studio](https://apify.com/evaluative_windbreak) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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/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 Domain Security Audit (SPF, DKIM, DMARC, MX)

Check how well a domain is protected against email spoofing and whether its mail setup is sound. Paste a list of domains, get one row per domain with a 0-100 score, an A-F grade and a plain list of what to fix.

Use it to check your own domains, audit client or vendor domains before a deliverability project, find spoofable domains in a portfolio, or add a check to an n8n, Make or Zapier flow.

### What you get

For every domain: MX records, the SPF record and its policy, how many DNS lookups SPF needs (the limit is 10), the DMARC record with policy, percentage and report address, DKIM keys found, MTA-STS, TLS-RPT, BIMI, a score, a grade and a list of issues.

```json
{
  "domain": "cloudflare.com",
  "status": "OK",
  "score": 100,
  "grade": "A",
  "hasMx": true,
  "spfPolicy": "fail",
  "spfLookupCount": 7,
  "dmarcPolicy": "reject",
  "dmarcPct": 100,
  "dkimSelectorsFound": ["k1", "s1"],
  "mtaSts": true,
  "tlsRpt": true,
  "issues": []
}
```

### Statuses

| Status | Meaning |
| --- | --- |
| OK | Domain exists and receives mail. Score and issues are filled in. |
| NO_MAIL | Domain has a null MX or only "v=spf1 -all". It is scored on blocking spoofing only. |
| DOMAIN_NOT_FOUND | The domain does not exist in DNS. |
| INVALID_DOMAIN | The input is not a domain name. |
| DNS_ERROR | DNS did not answer after retries. This is not a verdict. Run it again. |

### Score (100 points)

MX present 10. SPF present and single 15, strict ending (-all) 10 (~all 6), within 10 lookups 5. DMARC present 15, policy reject 15 (quarantine 10, none 3), report address 5, applies to 100% of mail 5. DKIM key found 10. MTA-STS 5. TLS-RPT 5.

### Input

- domains: up to 500 domains, one per line. URLs and email addresses are reduced to the domain. Duplicates are removed.
- dkimSelectors (optional): extra DKIM selector names. 28 common selectors are tested by default.

### Limits and notes

- Only public DNS records are read. No mail is sent and no servers are contacted.
- DKIM selectors cannot be listed from DNS. "No DKIM found" means none of the tested selectors exist. Add your provider's selector if you know it.
- SPF lookup counting follows include and redirect up to 6 levels deep.
- The score is a quick health check, not a full security audit.
- Not affiliated with any mail provider.

### Feedback

Wrong result for a domain? Open an issue on the Actor page with the domain and what you expected.

# Actor input Schema

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

Domains to audit, one per line, e.g. example.com. URLs and email addresses are reduced to the domain. Up to 500 per run, duplicates are removed.

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

DKIM selector names to test in addition to 28 common ones (google, selector1, selector2, k1, s1, default, and others). Add your own if your mail provider uses a custom selector.

## Actor input object example

```json
{
  "domains": [
    "cloudflare.com",
    "github.com",
    "example.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": [
        "cloudflare.com",
        "github.com",
        "example.com"
    ]
};

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

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

```

## MCP server setup

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

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/LLznZafbkd5LaqMuh/builds/pJgqOe0PoTkHvG0sp/openapi.json
