# Email Security Audit: SPF, DKIM, DMARC & SSL Checker (Bulk) (`docsmith/email-security-audit`) Actor

Check SPF, DKIM, DMARC, MX, MTA-STS, TLS-RPT, BIMI and website SSL for many domains at once. Get a score, grade, spoofing risk and plain-English fixes. For MSPs, IT teams and deliverability audits.

- **URL**: https://apify.com/docsmith/email-security-audit.md
- **Developed by:** [Docsmith Tools](https://apify.com/docsmith) (community)
- **Categories:** Developer tools, Business, Marketing
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 domains audited

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 Security Audit: SPF, DKIM, DMARC & SSL Checker (Bulk)

Audit the email security of **one domain or thousands** in a single run. For each domain you get a **score out of 100**, a **grade (A to F)**, whether it **can be spoofed**, and a **plain-English list of issues with the fix for each**.

Built for MSPs, IT teams, deliverability consultants and anyone doing security reviews or prospect audits.

### What it checks

| Check | What you get |
| --- | --- |
| **MX** | Mail servers and the detected mail provider (Microsoft 365, Google Workspace, Proofpoint, Mimecast and more) |
| **SPF** | Record, `all` policy, **recursive DNS lookup count (10 limit)**, void lookups, duplicate records, `+all` and `ptr` problems |
| **DMARC** | Policy (none/quarantine/reject), subdomain policy, pct, alignment, report addresses |
| **DKIM** | Keys found on 30+ common selectors (plus your own), key type and approximate key size, weak keys |
| **MTA-STS** | Record and policy mode (fetched from the domain's own policy file) |
| **TLS-RPT and BIMI** | Whether they are published |
| **Website SSL** | Certificate validity, issuer, expiry date and **days left** |

### Why use it

- **Bulk.** Paste a list of domains, email addresses or website links. Duplicates are removed.
- **Actionable.** Every issue comes with a severity (high, medium, low, info) and a one-line fix you can paste into a report.
- **Spoofing flag.** `spoofable: true` when the domain has no SPF, no DMARC or a `p=none` policy.
- **Fast and light.** DNS lookups only. No website scraping, no logins, no personal data.
- **Schedule it.** Run it weekly on your client list and catch certificate expiries and DNS changes before they cause problems.

### Output example

```json
{
  "domain": "example.com",
  "grade": "C",
  "score": 63,
  "spoofable": true,
  "mailProvider": "Microsoft 365",
  "summary": "C (63/100). 0 high, 1 medium issues. Domain can likely be spoofed.",
  "issues": [
    { "severity": "medium", "title": "DMARC policy is \"none\" (monitoring only)", "fix": "Spoofed mail is still delivered. Move to p=quarantine, then p=reject, once reports look clean." }
  ],
  "spf": { "found": true, "record": "v=spf1 include:spf.protection.outlook.com -all", "allQualifier": "-", "lookups": 3 },
  "dmarc": { "found": true, "policy": "none", "rua": "mailto:dmarc@example.com" },
  "dkim": { "found": [{ "selector": "selector1", "keyType": "rsa", "approxKeyBits": 2048 }] },
  "ssl": { "valid": true, "issuer": "Let's Encrypt", "validTo": "2027-02-01T00:00:00.000Z", "daysLeft": 59 }
}
```

The **Overview** table view shows domain, grade, score, spoofable and mail provider, ready to export to Excel or CSV.

### Pricing

Pay per domain audited. Domains that fail to resolve are not charged. Set a maximum cost per run and the tool stops cleanly before going over it.

### Notes

- DKIM selectors can't be listed from DNS, so a domain using an unusual selector may show "No DKIM key found". Add the selector under **Extra DKIM selectors**.
- Scores are a guide based on current best practice (SPF + DKIM + DMARC at p=reject is the target).

### How much does an email security audit cost?

You pay **US$0.004 per domain** (plus a tiny amount of Apify platform usage). Checking **100 client domains costs about 40 cents**, and 1,000 domains about US$4. Domains that don't exist are free. Apify's free plan includes monthly credit, so small audits can cost you nothing.

### How to check SPF, DKIM and DMARC for many domains

1. Click **Try for free**.
2. Paste your domains (or email addresses, or website links) into **Domains**.
3. Click **Start**. Most domains finish in a second or two.
4. Open the **Overview** tab for the grade table, or export to Excel, CSV or JSON.

To monitor clients, save the input as a **Task** and add a weekly **Schedule**, then connect an email or Slack integration.

### FAQ

**Is this a DMARC checker, an SPF checker or a DKIM checker?** All three, plus MX, MTA-STS, TLS-RPT, BIMI and website SSL expiry, in one run.

**How do I know if my domain can be spoofed?** Look at `spoofable`. It is `true` when there is no SPF, no DMARC, a `p=none` DMARC policy or an SPF record ending in `+all`.

**Why does it say "too many DNS lookups"?** SPF allows at most 10 DNS lookups across all includes. Past that, SPF fails for every message. The tool counts lookups through nested includes so you can see how close you are.

**Why is no DKIM key found?** DKIM keys sit under a "selector" name that can't be listed from DNS. Over 30 common selectors are checked (Microsoft 365, Google Workspace, SendGrid, Mailchimp/Mandrill, Zoho, Proton and more). Add your own under **Extra DKIM selectors**.

**Is it safe to run on client or prospect domains?** Yes. It only reads public DNS records and the public website certificate, like any DNS lookup tool. It doesn't send email or log in anywhere.

**Who is it for?** MSPs and IT providers doing onboarding audits or QBRs, email deliverability consultants, security teams and sales teams that use email security as a conversation starter.

### Use it from code or AI agents

Call it with the Apify API, the JavaScript or Python client, or through Apify's MCP server so AI agents can audit domains on demand.

### Other Docsmith tools

- [Document to Markdown](https://apify.com/docsmith/document-to-markdown): convert PDF, Word, Excel and PowerPoint files to Markdown and JSON for AI and RAG.
- [Image Converter & Compressor](https://apify.com/docsmith/image-converter): convert and resize images to WebP, AVIF, JPG or PNG.
- [RSS Feed Reader & Monitor](https://apify.com/docsmith/rss-feed-reader): turn RSS, Atom and JSON feeds into JSON, with only-new-items alerts.
- [Bulk URL Status Checker](https://apify.com/docsmith/url-status-checker): find broken links, redirect chains and expiring SSL certificates.

# Actor input Schema

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

Domains to audit, such as example.com. Website links and email addresses also work; the domain is taken from them.

## `extraDkimSelectors` (type: `array`):

Common selectors (selector1, selector2, google, default, k1, s1 and more) are always checked. Add any custom selectors your mail platform uses.

## `checkWebsiteSsl` (type: `boolean`):

Also check the HTTPS certificate on the domain: issuer, expiry date and days left.

## `onlyIssues` (type: `boolean`):

Leave out the raw DNS details and return only the score, grade and list of issues with fixes.

## `concurrency` (type: `integer`):

How many domains to check at the same time.

## Actor input object example

```json
{
  "domains": [
    "google.com",
    "microsoft.com"
  ],
  "extraDkimSelectors": [],
  "checkWebsiteSsl": true,
  "onlyIssues": false,
  "concurrency": 5
}
```

# Actor output Schema

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

All audited domains with issues, fixes and raw DNS details.

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

Summary table: domain, grade, score, spoofable, mail provider.

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

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

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

```

## MCP server setup

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