# Email Deliverability & DNS Checker (SPF, DKIM, DMARC, MX) (`webintel/email-dns-checker`) Actor

Bulk-check email deliverability DNS for domains: MX provider, SPF, DKIM selector discovery, DMARC, MTA-STS, TLS-RPT, BIMI and CAA with a clear grade and recommendations.

- **URL**: https://apify.com/webintel/email-dns-checker.md
- **Developed by:** [Deepak Ganesh](https://apify.com/webintel) (community)
- **Categories:** Marketing, Lead generation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 domains

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 Deliverability & DNS Checker (SPF, DKIM, DMARC, MX)

![Email Deliverability & DNS Checker (SPF, DKIM, DMARC, MX)](https://api.apify.com/v2/key-value-stores/21SBwDwdNtlnapIdO/records/email-dns-checker.png?v=382db62f)

Paste domains, URLs or email addresses and get a structured deliverability audit for each domain. The Actor uses DNS only (Node `dns/promises` Resolver; no scraping) plus the public MTA-STS HTTPS policy URL when present.

It checks:

- **MX records** and likely provider: Google Workspace, Microsoft 365, Zoho, Proton, Fastmail, Yahoo, Amazon SES, Mimecast, Proofpoint, Barracuda or other.
- **SPF**: record validity, mechanisms, `all` qualifier, duplicate records, recursive DNS lookup count, redirect/include loops and the RFC 7208 10-lookup limit.
- **DMARC**: policy (`p`, `sp`, `pct`), report addresses (`rua`, `ruf`), alignment (`adkim`, `aspf`) and common issues.
- **DKIM**: common selectors under `selector._domainkey.domain`, key type and approximate key size from the public key length.
- **MTA-STS**, **TLS-RPT**, **BIMI** and **CAA** records.
- A clear **0–100 score**, **A–F grade**, human-readable issues and recommendations.

Invalid inputs and non-existent domains are returned with `success: false` and are **not charged**.

### Use cases

- **Email marketers**: verify sender domains before campaigns and spot SPF/DMARC gaps.
- **Cold outreach senders**: check prospecting domains, aliases and sending infrastructure before warming up.
- **MSPs and agencies**: audit client mail DNS at scale during migrations to Google Workspace or Microsoft 365.
- **Security audits**: find domains without DMARC enforcement, reporting or strict SPF.
- **Lead qualification**: identify mail providers and authentication maturity for a list of companies.

### Input

| Field | Default | Description |
|---|---:|---|
| `domains` | – | Domains to check, one per line. Accepts plain domains, URLs and email addresses. Email addresses become their domain. URL hosts are lowercased and leading `www.` is stripped only for URLs. |
| `dkimSelectors` | common selector list | Selector names to query under `selector._domainkey.domain`. |
| `dnsServers` | system resolver, fallback `1.1.1.1` | Optional resolver IP addresses such as `1.1.1.1` and `8.8.8.8`. |
| `timeoutSecs` | `8` | Per DNS/HTTPS lookup timeout, 1–30 seconds. |
| `maxConcurrency` | `10` | Domains checked in parallel, 1–50. |

```json
{
  "domains": ["google.com", "user@example.com", "https://www.razorpay.com", "not a domain"],
  "timeoutSecs": 8
}
```

### Output example

One dataset item is produced per input. Example from a local run:

```json
{
  "input": "google.com",
  "domain": "google.com",
  "success": true,
  "exists": true,
  "error": null,
  "mx": [{ "exchange": "smtp.google.com", "priority": 10 }],
  "mxProvider": "Google Workspace",
  "spf": {
    "record": "v=spf1 include:_spf.google.com ~all",
    "valid": true,
    "mechanisms": ["include:_spf.google.com", "~all"],
    "all": "~all",
    "dnsLookupCount": 1,
    "tooManyLookups": false,
    "multipleRecords": false,
    "issues": []
  },
  "dmarc": {
    "record": "v=DMARC1; p=reject; rua=mailto:mailauth-reports@google.com",
    "policy": "reject",
    "p": "reject",
    "sp": null,
    "pct": null,
    "rua": ["mailto:mailauth-reports@google.com"],
    "ruf": [],
    "adkim": null,
    "aspf": null,
    "issues": []
  },
  "dkim": {
    "selectorsFound": [],
    "checkedSelectors": ["google", "selector1", "selector2", "default", "k1", "k2", "k3", "s1", "s2", "mail", "dkim", "smtp", "mandrill", "mxvault", "everlytickey1", "everlytickey2", "sig1", "zoho", "protonmail", "protonmail2", "protonmail3", "fm1", "fm2", "fm3", "amazonses", "cm", "mailjet", "sendgrid"]
  },
  "mtaSts": {
    "txt": "v=STSv1; id=20210803T010101;",
    "policy": "version: STSv1\r\nmode: enforce\r\nmx: smtp.google.com\r\nmx: aspmx.l.google.com\r\nmx: *.aspmx.l.google.com\r\nmax_age: 86400\r\n",
    "mode": "enforce",
    "max_age": "86400",
    "mx": ["smtp.google.com", "aspmx.l.google.com", "*.aspmx.l.google.com"],
    "error": null
  },
  "tlsRpt": "v=TLSRPTv1;rua=mailto:sts-reports@google.com",
  "bimi": null,
  "caa": ["0  \"pki.goog\""],
  "dnssec": null,
  "score": 86,
  "grade": "B",
  "issues": ["No DKIM selector found in checked common selectors", "BIMI record not found"],
  "recommendations": ["Enable DKIM at your mail provider or add the provider-specific selector.", "Optional: publish default._bimi TXT after DMARC enforcement."],
  "checkedAt": "2026-10-06T16:27:16.246Z"
}
```

### Pricing

Pay per event: successful, existing domains only.

| Event | Price | When |
|---|---:|---|
| Domain checked | **$0.002** ($2.00 per 1,000 domains) | Charged for each valid input whose domain exists and is checked. |

Invalid inputs, malformed domains and non-existent domains are free. The Actor respects your maximum cost per run and stops cleanly when the event charge limit is reached.

### FAQ

**Does it scrape websites?** No. It uses DNS queries and, when MTA-STS is configured, fetches `https://mta-sts.<domain>/.well-known/mta-sts.txt`.

**Why was DKIM not found?** DKIM selectors are not discoverable by DNS enumeration. The Actor checks a broad common selector list; if your provider uses a custom selector, add it to `dkimSelectors`.

**Why keep subdomains?** Plain domains are checked exactly as provided. For URLs only, a leading `www.` is stripped to audit the organization domain behind common website URLs.

**What does `success` mean?** `success: true` means the input normalized to a valid domain, the domain exists by NS/SOA, and the check is chargeable. Per-record failures are captured in the result instead of crashing the run.

**Is DNSSEC checked?** The output includes `dnssec: null`; DNSSEC is intentionally skipped in this version for portability.

### Changelog

- **0.1**: Initial release with MX provider detection, SPF recursive lookup analysis, DMARC parsing, DKIM selector checks, MTA-STS, TLS-RPT, BIMI, CAA, scoring and pay-per-event charging.

# Actor input Schema

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

Domains to check, one per line. You can paste plain domains, URLs or email addresses. Email addresses are converted to their domain; URL hosts are lowercased and leading www. is stripped only for URLs.

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

Selector names to query under selector.\_domainkey.domain. Defaults cover common Google, Microsoft, Mailchimp, Fastmail, Proton, Zoho and ESP selectors.

## `dnsServers` (type: `array`):

Optional DNS resolver IP addresses, e.g. 1.1.1.1 and 8.8.8.8. By default the Actor uses the system resolver and falls back to 1.1.1.1.

## `timeoutSecs` (type: `integer`):

Maximum seconds to wait for each DNS or HTTPS policy lookup.

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

Maximum domains checked in parallel.

## Actor input object example

```json
{
  "domains": [
    "google.com",
    "apify.com",
    "user@example.com",
    "https://www.razorpay.com"
  ],
  "dkimSelectors": [
    "google",
    "selector1",
    "selector2",
    "default",
    "k1",
    "k2",
    "k3",
    "s1",
    "s2",
    "mail",
    "dkim",
    "smtp",
    "mandrill",
    "mxvault",
    "everlytickey1",
    "everlytickey2",
    "sig1",
    "zoho",
    "protonmail",
    "protonmail2",
    "protonmail3",
    "fm1",
    "fm2",
    "fm3",
    "amazonses",
    "cm",
    "mailjet",
    "sendgrid"
  ],
  "timeoutSecs": 8,
  "maxConcurrency": 10
}
```

# Actor output Schema

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

All checked domains as JSON. Each item includes domain, success, exists, mx, mxProvider, spf, dmarc, dkim, mtaSts, tlsRpt, bimi, caa, score, grade, issues and recommendations.

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

Score, grade, provider, authentication status and top issues.

## `authentication` (type: `string`):

Detailed SPF, DKIM, DMARC, MTA-STS, TLS-RPT and BIMI records.

# 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",
        "apify.com",
        "user@example.com",
        "https://www.razorpay.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("webintel/email-dns-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": [
        "google.com",
        "apify.com",
        "user@example.com",
        "https://www.razorpay.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("webintel/email-dns-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": [
    "google.com",
    "apify.com",
    "user@example.com",
    "https://www.razorpay.com"
  ]
}' |
apify call webintel/email-dns-checker --silent --output-dataset

```

## MCP server setup

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