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

Check SPF, DKIM, DMARC and MX records for any list of domains. One graded row per domain: can it be spoofed, which email provider it uses, what is wrong and the exact DNS record to fix it.

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

## Pricing

from $0.80 / 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

## SPF, DKIM & DMARC Checker: Bulk Email Security Audit

Paste a list of domains and find out, for each one, whether someone can send forged email in its name. The Actor reads the public DNS records that protect email (SPF, DKIM, DMARC, MX) and returns one graded row per domain with a plain verdict, the email provider in use, every problem found and the exact record to publish to fix it.

No mail is sent and no mailbox is contacted: only public DNS is read.

### What does it check?

| Record | Checks |
|---|---|
| **DMARC** | Present, single record, policy (`none`, `quarantine`, `reject`), percentage applied, subdomain policy, report addresses |
| **SPF** | Present, single record, how it ends (`-all`, `~all`, `?all`, `+all`), number of DNS lookups against the limit of 10, includes followed, deprecated `ptr` |
| **DKIM** | About 45 common selector names probed, key size, revoked keys, plus any selector you provide |
| **MX** | Mail servers, and the provider behind them: Google Workspace, Microsoft 365, Zoho, Proton, OVH and 20 others |
| **Extras** | MTA-STS, TLS-RPT and BIMI records |

Each row carries a `spoofable` flag: `true` unless an enforced DMARC policy (`quarantine` or `reject`, on 100% of mail) protects the domain.

### Who is it for?

- **IT providers and security consultants**: audit every client domain in one run, or show a prospect their exposure before a call.
- **Email and deliverability specialists**: find broken SPF records (too many lookups, duplicates) across a portfolio.
- **Sales teams**: enrich a lead list with the email provider each company uses, or target companies with no DMARC.
- **Companies with many domains**: schedule a weekly run and catch a record that was removed by mistake.

### How to use it

1. Paste domains, URLs or email addresses into **Domains to audit**.
2. Click **Start**.
3. Export as JSON, CSV or Excel, or read the results through the API.

### Input

```json
{
    "domains": ["apify.com", "https://github.com", "someone@example.org"],
    "checkDkim": true,
    "dkimSelectors": []
}
```

### Output

One item per domain (shortened):

```json
{
    "domain": "example.org",
    "ok": true,
    "grade": "C",
    "score": 61,
    "spoofable": true,
    "summary": "Not protected: DMARC only monitors, forged mail is still delivered.",
    "receivesMail": true,
    "emailProvider": "Google Workspace",
    "mxHosts": ["aspmx.l.google.com"],
    "spfRecord": "v=spf1 include:_spf.google.com ~all",
    "spfAll": "softfail (~all)",
    "spfLookupCount": 4,
    "dmarcRecord": "v=DMARC1; p=none; rua=mailto:dmarc@example.org",
    "dmarcPolicy": "none",
    "dmarcPct": 100,
    "dkimSelectorsFound": ["google"],
    "mtaSts": false,
    "errors": [],
    "warnings": ["DMARC_POLICY_NONE"],
    "notices": ["SPF_SOFTFAIL"],
    "issues": [
        {
            "code": "DMARC_POLICY_NONE",
            "severity": "warning",
            "message": "DMARC policy is p=none: forged mail is reported but still delivered.",
            "fix": "Move to p=quarantine, then p=reject, once reports show legitimate mail passes."
        }
    ],
    "checkedAt": "2026-12-02T21:00:00.000Z"
}
```

### Issue codes

| Severity | Codes | Points lost each |
|---|---|---|
| Error | `SPF_MISSING`, `SPF_MULTIPLE`, `SPF_PASS_ALL`, `SPF_TOO_MANY_LOOKUPS`, `DMARC_MISSING`, `DMARC_MULTIPLE`, `DMARC_INVALID` | 25 |
| Warning | `SPF_NO_ALL`, `SPF_NEUTRAL`, `DMARC_POLICY_NONE`, `DMARC_SUBDOMAINS_OPEN`, `DKIM_WEAK_KEY` | 12 |
| Notice | `SPF_SOFTFAIL`, `SPF_PTR`, `SPF_LONG`, `DMARC_PARTIAL`, `DMARC_QUARANTINE`, `DMARC_NO_REPORTS`, `DKIM_NOT_FOUND`, `MX_MISSING` | 3 |

The score starts at 100. Score 90 to 100 is **A**, 75 to 89 **B**, 60 to 74 **C**, 40 to 59 **D**, 20 to 39 **E**, below 20 **F**. A domain that can be spoofed never gets better than **C**.

### Pricing

You pay per domain audited. Invalid entries, domains that do not exist and domains whose DNS could not be read are returned with an `error` field and are not charged.

### Limits

- **DKIM cannot be listed.** DNS does not reveal which selectors a domain uses, so only common names and the ones you provide are tried. `DKIM_NOT_FOUND` means "not found under these names", not "no DKIM".
- The audit reads DNS. It does not send test mail, so it cannot confirm that real messages are signed and aligned.
- Subdomains are audited only if you list them.
- The grade is a transparent checklist score, described above, not an official rating.

### FAQ

**Does it contact the mail servers?** No. It only asks public DNS resolvers, like any mail server does before accepting a message.

**Can I audit domains I do not own?** These records are public by design; every receiving mail server reads them.

**Something looks wrong?** Open an issue in the Issues tab with the domain and the run ID.

### More tools from the same developer

Same approach in each: public sources only, no login, one clear row per result, errors explained.

- [Security Headers Checker](https://apify.com/laudedignus/security-headers-audit): grade the HTTP security headers of any list of websites.
- [SEO Audit Tool](https://apify.com/laudedignus/seo-page-audit): score the on-page SEO of any list of URLs.
- [Tech Stack Detector](https://apify.com/laudedignus/tech-stack-detector): find the CMS, shop platform, analytics and hosting behind any list of websites.
- [Broken Link Checker](https://apify.com/laudedignus/broken-link-checker): crawl a website and list its dead links and 404s.
- [App Store Reviews Scraper](https://apify.com/laudedignus/app-store-reviews): get the App Store reviews of an iOS app across 50+ countries.
- [Bulk WHOIS Lookup (RDAP)](https://apify.com/laudedignus/domain-rdap-lookup): look up registration, expiry and availability for thousands of domains.
- [Sitemap URL Extractor](https://apify.com/laudedignus/sitemap-url-extractor): list every URL a website declares in its sitemaps.
- [Wayback Machine Scraper](https://apify.com/laudedignus/wayback-snapshots): list every archived capture of a page, folder or domain.
- [RSS Feed Reader](https://apify.com/laudedignus/rss-feed-reader): read RSS and Atom feeds and get only the new items on each run.

# Actor input Schema

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

Domains, one per line. Website URLs and email addresses are accepted too: the domain is extracted from them.

## `checkDkim` (type: `boolean`):

Probe about 45 common DKIM selector names (google, selector1, k1, default and others). DKIM selectors are not listed publicly, so a custom selector can only be found if you provide it below.

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

Optional. Selector names to check in addition to the common ones, for example the one shown in your email provider's settings.

## `compactOutput` (type: `boolean`):

Leave out the detailed issue messages and DKIM key details. Grade, verdict, records and issue codes are kept.

## `maxConcurrency` (type: `integer`):

How many domains are looked up at the same time.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com"
  ],
  "checkDkim": true,
  "compactOutput": false,
  "maxConcurrency": 20
}
```

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,laudedignus/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/1lqDhgnq2tD0j2UVP/builds/6RZbDGu6ARlbSfSQN/openapi.json
