# Email Domain Security Audit – SPF, DKIM, DMARC Grade A–F (`yck69/email-domain-security`) Actor

Audit the email security of any list of domains: SPF with DNS-lookup count, DKIM keys, DMARC policy, MTA-STS, TLS-RPT, BIMI and DNSSEC, mail provider and sending services detected, a grade from A to F and a fix for every issue. Thousands of domains per minute.

- **URL**: https://apify.com/yck69/email-domain-security.md
- **Developed by:** [yck](https://apify.com/yck69) (community)
- **Categories:** Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 20 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 domains checked

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 Grade A–F

https://www.youtube.com/watch?v=GVr0E3u2npg

**What does Email Domain Security Audit do?** It checks how well any domain is protected against **email spoofing and phishing**, and how ready it is for good deliverability — for one domain or 100,000. Everything is read from public DNS (no email is sent, nothing is scanned), and each domain gets a **grade from A to F** with a plain-language fix for every issue.

- **SPF**: record, `-all` / `~all` qualifier, **recursive DNS-lookup count** (more than 10 breaks SPF), duplicate records, deprecated mechanisms.
- **DMARC**: policy (`none`, `quarantine`, `reject`), subdomain policy, percentage, report addresses, alignment.
- **DKIM**: about 30 common selectors tested (Google, Microsoft 365, Mailchimp, SendGrid, Fastmail, Zoho, Proton…), key type and size, delegated keys, wildcard records; add your own selectors.
- **Transport and brand**: MTA-STS (mode read from the policy file), TLS-RPT, BIMI logo and certificate, DNSSEC, CAA.
- **Who handles the mail**: mail provider from MX (Google Workspace, Microsoft 365, OVHcloud, Proofpoint, Mimecast…) and **sending services found in SPF** (HubSpot, Salesforce, Mailchimp, SendGrid, Brevo, Zendesk, Amazon SES…).

Built for MSPs and IT consultants prospecting clients, deliverability and cold-email teams, security and compliance audits (NIS2, supplier risk), and sales teams who want a prospect's email stack.

### What data can you get?

<table>
<tr><td>🎓 Grade A to F</td><td>🛡️ Spoofing protection</td><td>📬 Mail provider</td></tr>
<tr><td>📤 Sending services</td><td>🧾 SPF and lookups</td><td>📜 DMARC policy</td></tr>
<tr><td>🔑 DKIM keys</td><td>🔒 MTA-STS</td><td>📊 TLS-RPT</td></tr>
<tr><td>🖼️ BIMI</td><td>🔐 DNSSEC</td><td>🛠️ Fix per issue</td></tr>
</table>

### How to use it

1. Click **Try for free** and open the Actor.
2. Paste **domains**, websites or emails.
3. Optionally add your own DKIM selectors.
4. Click **Start** and sort by grade.
5. Export, or schedule weekly to monitor changes.

### Input examples

**A few domains (websites and email addresses work too)**

```json
{
  "domains": ["apify.com", "https://www.lemonde.fr/", "contact@example.com"]
}
```

**Audit every company website in a lead list, keep only domains with issues**

```json
{
  "datasetId": "YOUR_DATASET_ID",
  "domainField": "website",
  "onlyProblems": true
}
```

**Check your own domain with your custom DKIM selector**

```json
{
  "domains": ["yourcompany.com"],
  "dkimSelectors": ["20230601", "mkt1"]
}
```

### Output

Real audits from a run in November 2026:

| Domain | Grade | Mail provider | SPF | DMARC | DKIM | Sending services found |
|---|---|---|---|---|---|---|
| apify.com | A (100) | Google Workspace | -all, 10 lookups | reject | ✓ | Mailgun, Amazon SES, HubSpot |
| decathlon.fr | A (100) | Google Workspace | -all, 7 lookups | reject | ✓ | Amazon SES, Zendesk, Atlassian |
| leboncoin.fr | A (96) | Google Workspace | -all, 8 lookups | reject | ✓ | OVHcloud, Zendesk, Mailjet, SendGrid |
| lemonde.fr | A (91) | Google Workspace | -all, 8 lookups | quarantine | ✓ | Mailjet, Brevo, Salesforce |
| bbc.co.uk | B (89) | Self-hosted | ~all, 4 lookups | reject | – | Atlassian, DocuSign |
| example.com | A (98) | No mail | -all | reject | wildcard empty key | – |

A large retailer in the same run scored **C (72)**: DMARC at `p=none`, SPF ending in `~all` and no DKIM key on common selectors — spoofed emails in its name are not blocked.

```json
{
  "domain": "leboncoin.fr",
  "grade": "A",
  "score": 96,
  "spoofingProtection": "strong",
  "mailProvider": "Google Workspace",
  "sendingServices": ["OVHcloud", "Google Workspace", "Zendesk", "Mailjet", "SendGrid", "Atlassian", "DocuSign"],
  "spf": {
    "qualifier": "fail (-all)",
    "dnsLookups": 8,
    "includes": ["mx.ovh.com", "_spf.google.com", "mail.zendesk.com", "spf.mailjet.com", "u17999851.wl102.sendgrid.net"]
  },
  "dmarc": { "policy": "reject", "pct": 100, "reportsTo": "mailto:leboncoin@dmarc.postmastery.com" },
  "issues": [
    { "severity": "low", "code": "spf-near-limit", "message": "SPF uses 8 of the 10 allowed DNS lookups.", "fix": "Avoid adding more includes." },
    { "severity": "info", "code": "mta-sts-missing", "message": "No MTA-STS: incoming mail can be downgraded to unencrypted transport.", "fix": "Publish an MTA-STS policy (mode: enforce)." }
  ]
}
```

| Field | Meaning |
|---|---|
| `grade` / `score` | A (90+) to F, starting from 100: −25 per high issue, −12 medium, −5 low, −2 info, +5 for DMARC reject. |
| `spoofingProtection` | `strong` (SPF + DMARC quarantine/reject on 100% of mail), `partial` (SPF and DMARC but not enforced), `weak`. |
| `issues[]` | Each problem with `severity` (high, medium, low, info), a stable `code`, an explanation and the `fix`. |
| `sendsNoMail` | The domain has no MX, SPF `-all` and no sender: missing DKIM is then not an issue. |

### How much does it cost?

**$3 per 1,000 domains** ($0.003 per domain audited). Non-existent domains and invalid values are free. A run of 10 domains takes about 3 seconds.

### More Actors from this developer

### FAQ

##### Is this intrusive?

No. It only reads public DNS records (through DNS-over-HTTPS) and the public MTA-STS policy file — the same information every mail server reads when it receives an email.

##### Why "DKIM not found" when the domain signs its mail?

DKIM keys sit under a selector name that DNS cannot list. About 30 common selectors are tested; providers like Google use date-based selectors (e.g. `20230601`). Add yours in `dkimSelectors` to check it.

##### Can I monitor my clients' domains?

Yes: save the input as a task and schedule it weekly, then send the dataset to Slack, email or a Google Sheet with Apify integrations to catch DMARC or SPF changes.

##### Can I use it through the API, Make, Zapier or Google Sheets?

Yes. Every run can be started and read through the [Apify API](https://docs.apify.com/api/v2) (JavaScript and Python clients, CLI, MCP), and Apify integrations connect it to Make, Zapier, n8n, Google Sheets, Slack, webhooks and more.

##### Is it legal to use this data?

The Actor only reads public or official open data and doesn't log in anywhere. Check the source's licence and your local rules (for example GDPR when data concerns people) for your use case; if in doubt, ask a lawyer.

##### Something isn't working, or you need another field?

Open an issue on the **Issues** tab: feedback is read and answered.

# Actor input Schema

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

Domains, website URLs or email addresses, one per line: <code>example.com</code>, <code>https://www.example.com/contact</code> or <code>jane@example.com</code> all check example.com.

## `datasetId` (type: `string`):

ID of an Apify dataset, e.g. leads or companies scraped by another Actor.

## `domainField` (type: `string`):

Field holding the website, domain or email.

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

DKIM keys can't be listed through DNS: about 30 common selectors are tested. Add your own (e.g. <code>20230601</code>, <code>mailo</code>).

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

Skip domains without any issue in the dataset (they are still checked).

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "lemonde.fr",
    "example.com"
  ],
  "domainField": "website",
  "onlyProblems": false
}
```

# Actor output Schema

## `audits` (type: `string`):

Grade, protection and main settings per domain.

## `results` (type: `string`):

Every field of every row.

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

The SUMMARY record.

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yck69/email-domain-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/8yrmd95zYu8B6oWpZ/builds/nP64Gseds4Js1srRp/openapi.json
