# Email Security Checker: SPF, DMARC, DKIM & MTA-STS audit (`berryish_pillar/email-security-dns-audit`) Actor

Bulk-audit domains for email authentication and DNS security: SPF (with 10-lookup check), DMARC policy, DKIM selectors, MTA-STS, TLS-RPT, BIMI, DNSSEC and CAA. 0-100 score, A-F grade, spoofing risk, fixes, plus mailbox provider and email tools detected. $2 per 1,000 domains.

- **URL**: https://apify.com/berryish_pillar/email-security-dns-audit.md
- **Developed by:** [berryish_pillar](https://apify.com/berryish_pillar) (community)
- **Categories:** Developer tools, Lead generation
- **Features:** Limited permissions
- **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

## Email Security Checker: bulk SPF, DMARC, DKIM, MTA-STS & BIMI audit

Audit **any number of domains** for email authentication and DNS security in seconds. For each domain you get a **0–100 score, an A–F grade, a spoofing-risk rating**, every problem with a **plain-English fix**, and the **mailbox provider and email tools** the company uses (Google Workspace, Microsoft 365, SendGrid, HubSpot, Mailchimp, Salesforce, Klaviyo…).

**$2 per 1,000 domains. No monthly rental. Domains that don't exist are free.**

### What does it check?

| Check | What you get |
|---|---|
| **SPF** | Record, `all` qualifier, **recursive DNS-lookup count (10-lookup limit)**, void lookups, multiple-record errors, includes, sending services detected |
| **DMARC** | Policy (`p`), subdomain policy (`sp`), `pct`, `rua` / `ruf` report addresses, alignment, inheritance from the parent domain |
| **DKIM** | Probes ~45 common selectors (Google, Microsoft 365, SendGrid, Mailchimp, HubSpot, Klaviyo, Zoho, Proton, Fastmail, Postmark…) plus your own; key size, revoked keys, CNAME delegation, wildcard detection |
| **MX** | Hosts, priorities, **mailbox / security-gateway provider** (Google, Microsoft, Proofpoint, Mimecast, Barracuda…), null MX |
| **MTA-STS** | TXT record **and** the HTTPS policy file (mode, mx, max_age) |
| **TLS-RPT, BIMI** | Records, BIMI logo and certificate URLs |
| **DNSSEC, CAA, NS** | DS at the parent zone, allowed certificate authorities, nameservers |

### Who uses this?

- **Cold email and deliverability teams**: check sending domains before a campaign; Gmail, Yahoo and Microsoft now require SPF, DKIM and DMARC for bulk senders.
- **MSPs, MSSPs and security consultants**: find prospects with no DMARC or `p=none`, and hand them a ready-made report. Use **Output only domains graded at or below** to pay only for leads.
- **Sales intelligence**: see which email platform, marketing automation, CRM and helpdesk a company uses, straight from its SPF and DKIM.
- **Vendor and M\&A due diligence**: score the email security of suppliers and acquisition targets in bulk.
- **IT teams**: monitor your own domains on a schedule and alert when something regresses.

### How to use it

1. Paste **Domains** (or website URLs, or email addresses).
2. Optional: add known **DKIM selectors**, or filter the output to weak grades.
3. Click **Start**. Export JSON, CSV or Excel, or call it from the API, n8n, Make or Zapier.

#### Input example

```json
{
  "domains": ["apify.com", "github.com", "shopify.com", "stripe.com", "example.com"],
  "probeCommonDkimSelectors": true,
  "onlyGradesAtOrBelow": null
}
```

#### Output example (trimmed)

```json
{
  "domain": "github.com",
  "score": 83,
  "grade": "B",
  "spoofingRisk": "low",
  "mailboxProvider": "Microsoft 365",
  "sendingServices": ["Google Workspace / Google Cloud", "Mailchimp", "Marketo", "Microsoft 365", "Salesforce", "SendGrid", "Zendesk"],
  "mx": [{ "host": "github-com.mail.protection.outlook.com", "priority": 0, "provider": "Microsoft 365" }],
  "spf": { "record": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com … ~all", "allQualifier": "~", "dnsLookups": 10, "voidLookups": 0, "valid": true },
  "dmarc": { "record": "v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:dmarc@github.com; …", "policy": "quarantine", "subdomainPolicy": "reject", "pct": 100, "rua": ["mailto:dmarc@github.com"] },
  "dkim": { "selectorsChecked": 46, "hasDkim": true, "found": [{ "selector": "google", "keyBits": 2048 }, { "selector": "selector1", "keyBits": 1024 }, { "selector": "s1", "keyBits": 2048 }] },
  "mtaSts": { "record": null, "policyMode": null },
  "tlsRpt": null,
  "bimi": null,
  "dnssec": false,
  "caa": ["0 issue \"digicert.com\"", "0 issue \"letsencrypt.org\""],
  "issues": [
    { "severity": "low", "check": "dmarc", "message": "DMARC is p=quarantine: spoofed mail goes to spam rather than being rejected.", "fix": "Move to p=reject when ready." },
    { "severity": "low", "check": "spf", "message": "SPF uses 10 of the 10 allowed DNS lookups.", "fix": "Leave headroom before adding another sending service." }
  ],
  "issueCounts": { "critical": 0, "high": 0, "medium": 0, "low": 5, "info": 0 },
  "auditedAt": "2026-11-20T04:24:23Z"
}
```

#### Scoring

Each domain starts at 100 and loses points per problem: no DMARC (−30), no SPF (−25), `+all` (−25), more than 10 SPF lookups (−15), `p=none` (−15), no DKIM found (−10), no MTA-STS (−4), no DNSSEC (−3) and so on. **A ≥ 90, B ≥ 80, C ≥ 65, D ≥ 50, F below.** `spoofingRisk` is `low` only with an enforced DMARC policy (quarantine/reject at 100%).

### How much does it cost?

| Event | Price |
|---|---|
| Domain audited | **$0.002** ($2 per 1,000) |
| Actor start | $0.00005 |

Examples: your own 20 domains weekly = **$0.04 a week**. 10,000 prospect domains = **$20**; with **only C and worse** you pay just for the matching leads.

### Tips and limits

- DKIM can't be listed from DNS; selectors have to be guessed. "No DKIM found" means none of the ~45 common selectors exist. Add your own selector (the `s=` value from a DKIM-Signature header) for certainty.
- It reads DNS and the public MTA-STS policy file only. It never sends email, connects to SMTP or checks mailboxes.
- Results reflect live DNS at run time; DNS caches can lag recent changes by minutes.

### Is it legal? Responsible use

Everything checked is public DNS data that domains publish so that mail servers worldwide can read it, plus the MTA-STS policy file that is public by design. No personal data is collected.

### Related tools

- [Domain Availability & WHOIS Checker](https://apify.com/berryish_pillar/domain-availability-whois-checker): registrar, age and expiry for the same domains.
- [Website Tech Detector](https://apify.com/berryish_pillar/website-tech-detector): the web stack behind each domain.

# Actor input Schema

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

Domains, website URLs or email addresses (john@acme.com is audited as acme.com).

## `useRegistrableDomain` (type: `boolean`):

Reduce mail.acme.co.uk to acme.co.uk. Turn off to audit subdomains exactly as given (DMARC still falls back to the parent domain).

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

Selectors you know of (e.g. from a DKIM-Signature header s= value). Checked first.

## `probeCommonDkimSelectors` (type: `boolean`):

Check ~45 selectors used by Google, Microsoft 365, SendGrid, Mailchimp, HubSpot, Klaviyo, Zoho, Proton, Fastmail and others.

## `onlyGradesAtOrBelow` (type: `string`):

Lead-gen filter, e.g. C returns only C, D and F domains (you pay only for output domains).

## `maxDomains` (type: `integer`):

0 = no limit.

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

How many domains to audit at the same time.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "shopify.com",
    "stripe.com",
    "example.com"
  ],
  "useRegistrableDomain": true,
  "probeCommonDkimSelectors": true,
  "maxDomains": 0,
  "maxConcurrency": 8
}
```

# Actor output Schema

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

No description

## `summary` (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",
        "shopify.com",
        "stripe.com",
        "example.com"
    ]
};

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

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

```

## MCP server setup

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