# Email Domain Security Checker: SPF, DKIM, DMARC, MTA-STS (`larkmoor/email-domain-security-checker`) Actor

Bulk-check SPF, DKIM, DMARC, MX, MTA-STS, TLS-RPT, BIMI and DNSSEC for any list of domains. Each domain gets a 0-100 score, an A-F grade, a Gmail/Yahoo bulk-sender verdict, the SPF lookup count and the exact fixes. Public DNS only, no API keys.

- **URL**: https://apify.com/larkmoor/email-domain-security-checker.md
- **Developed by:** [Larkmoor Data](https://apify.com/larkmoor) (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

from $1.28 / 1,000 domain checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Domain Security Checker: SPF, DKIM, DMARC, MTA-STS

Check the email security of hundreds or thousands of domains in one run. For every domain you get the SPF record and how many DNS lookups it really needs, the DMARC policy and report addresses, the DKIM keys found and their size, the mail provider behind the MX records, MTA-STS, TLS-RPT, BIMI and DNSSEC. Each domain gets a 0-100 score, an A-F grade, a clear yes/no on the Gmail and Yahoo bulk-sender rules, and a list of the exact records to add or change.

Everything is read from public DNS (plus the public MTA-STS policy file), so there are no API keys, no logins and no rate-limited third-party service in between.

### What you can use it for

- **Deliverability audits**: find every domain in your portfolio (or your clients') that still has no DMARC, a DMARC of `p=none`, or an SPF record that breaks the 10-lookup limit.
- **Agencies and MSPs**: run a client's whole domain list before an onboarding call and hand over the fixes column.
- **Cold-email and sales teams**: check sending domains before a campaign; a domain that is not bulk-sender ready lands in spam at Gmail and Yahoo.
- **Security reviews and vendor risk**: spot domains that anyone can spoof (no SPF, `+all`, no DMARC) and parked domains that are not locked down.
- **Lead qualification**: the mail provider (Google Workspace, Microsoft 365, Zoho, Proofpoint, Mimecast...) and the sending services in SPF (SendGrid, Mailchimp, HubSpot, Salesforce, Klaviyo, Amazon SES...) tell you which tools a company uses.

### What it checks

| Check | What you get |
|---|---|
| MX | records, whether the domain receives mail, null MX, mail provider |
| SPF | record, status (ok / weak / invalid / missing), the `all` mechanism, DNS lookups counted through every include (limit 10), sending services found |
| DMARC | record, policy, subdomain policy, pct, alignment, rua / ruf report addresses |
| DKIM | keys found on your selectors and 46 common ones, key type, approximate RSA key size, revoked keys |
| MTA-STS | DNS record plus the policy file mode (enforce / testing / none) |
| TLS-RPT, BIMI | records when present |
| DNSSEC | validated (AD flag) or not |

### Input

- **Domains**: one per line. `https://www.example.com/page` and `jane@example.com` both become `example.com`.
- **Email addresses** (optional): the domain of each address is checked once.
- **Your DKIM selectors** (optional): DKIM keys live under a selector name that DNS cannot list. The actor tries 46 selectors used by the big providers; add your own (your email provider shows it) to be sure.
- **Only report domains with problems**: skip the clean ones (A grade and bulk-sender ready). Skipped domains are not charged.
- **Max domains, parallel checks, DNS timeout**: safe defaults; you rarely need to touch them.

Example input:

```json
{
  "domains": ["apify.com", "github.com", "stripe.com", "example.com"],
  "dkimSelectors": ["20230601"],
  "onlyProblems": false
}
```

### Output

One row per domain. Example (shortened):

```json
{
  "domain": "github.com",
  "grade": "B",
  "score": 73,
  "bulkSenderReady": true,
  "mailProvider": "Microsoft 365",
  "spfStatus": "ok",
  "spfAll": "~all",
  "spfDnsLookups": 10,
  "spfSenders": ["Mailchimp", "Microsoft 365", "Salesforce", "SendGrid", "Zendesk"],
  "dmarcPolicy": "quarantine",
  "dmarcRua": "mailto:dmarc@github.com",
  "dkimSelectorsFound": [{"selector": "google", "keyType": "rsa", "approxKeyBits": 2048, "revoked": false}],
  "mtaSts": null,
  "dnssec": false,
  "issues": ["SPF uses 10 of 10 DNS lookups (one more include will break it)", "A DKIM key is 1024-bit (2048-bit is recommended)"],
  "fixes": [],
  "summary": "B (73/100): SPF uses 10 of 10 DNS lookups ..."
}
```

Download the results as CSV, Excel, JSON or HTML, or read them through the API. The table view shows grade, score, bulk-sender verdict, provider, SPF, DMARC, DKIM, MTA-STS, DNSSEC and the one-line summary.

#### How the score works

SPF (up to 25), DMARC (up to 30), DKIM (up to 20), MX present (10) and the extras MTA-STS, TLS-RPT, BIMI and DNSSEC (up to 15). A = 85+, B = 70+, C = 55+, D = 40+, F below. A domain that sends no mail at all and is locked down (null or no MX, `v=spf1 -all`, `p=reject`) needs no DKIM key and is scored as complete.

#### The Gmail and Yahoo bulk-sender rules

Since February 2024 Gmail and Yahoo require bulk senders to have SPF and DKIM, and a DMARC record (at least `p=none`). `bulkSenderReady` is `true` when all three are in place, `false` when something is missing, and `null` when SPF and DMARC pass but no DKIM key was found on the selectors tried (add your selector to confirm).

### Cost

You pay per domain checked: **$1.50 per 1,000 domains** (less on higher Apify plans). Domains that do not exist are returned free, and with "Only report domains with problems" the clean domains are free too.

- 100 domains: about $0.15
- 1,000 domains: about $1.50
- 10,000 domains: about $15

A run of 1,000 domains usually takes 2-4 minutes at the default settings.

### FAQ

**Is this legal?** Yes. DNS records are public by design: every mail server in the world reads them before accepting a message. The actor only sends normal DNS queries and one HTTPS request for a published MTA-STS policy. It does not connect to mail servers, send email or test passwords.

**Why does a big company get "DKIM not found"?** Some senders use rotating or custom selectors (Google's own domains use date-based names such as `20230601`). DNS cannot list selectors, so add the selector in the input when you know it. The row then says exactly which selectors were found.

**What does "SPF uses 11 DNS lookups" mean?** Receivers stop after 10 DNS-querying terms (include, a, mx, exists, redirect) and treat the record as a permanent error, which fails SPF for every message. Remove unused includes or flatten the record.

**Does it check blacklists?** No. Most blocklists forbid commercial bulk queries without a subscription, so we leave them out.

**Can I monitor domains over time?** Yes: save the input as a task and schedule it daily or weekly, then compare grades or use "Only report domains with problems" to get just the regressions.

### Integrations

Use it from the Apify API, the Apify CLI, Make, Zapier, n8n, Google Sheets export or a webhook when a run finishes. Feed it the domain column of a lead list and join the grade back.

### Changelog

- **0.1** (Nov 8, 2026): first release: SPF with recursive lookup count and sender detection, DMARC tags, DKIM on 46 common + custom selectors with key size, MX provider, MTA-STS policy mode, TLS-RPT, BIMI, DNSSEC, 0-100 score, A-F grade, Gmail/Yahoo bulk-sender verdict, issues and fixes, free rows for non-existent domains.

# Actor input Schema

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

Domains to check, one per line (example.com). Website URLs and email addresses also work: the domain is taken from them.

## `emails` (type: `array`):

Optional list of email addresses; each address's domain is checked once.

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

DKIM selectors to check besides the 46 common ones (for example 20230601 for Google's own domains, or the selector your email provider shows you).

## `probeCommonSelectors` (type: `boolean`):

Try 46 selectors used by Google Workspace, Microsoft 365, SendGrid, Mailchimp, Amazon SES, Zoho, Klaviyo, HubSpot and others.

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

Skip domains that grade A and meet the Gmail / Yahoo bulk-sender rules (they are not charged).

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

Upper limit of domains checked in this run.

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

Domains checked at the same time.

## `dnsTimeoutSecs` (type: `integer`):

How long to wait for each DNS answer.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "stripe.com",
    "example.com"
  ],
  "probeCommonSelectors": true,
  "onlyProblems": false,
  "maxDomains": 5000,
  "concurrency": 10,
  "dnsTimeoutSecs": 5
}
```

# Actor output Schema

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

One row per domain in the run's default dataset (CSV/Excel/JSON).

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

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

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

```

## MCP server setup

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

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/UhNcA2Ie8mRqSi8ez/builds/YCYZGGOvtCqe5Zz2x/openapi.json
