# Bulk SPF, DKIM & DMARC Domain Audit (`mediapro-tools/email-domain-auth-audit`) Actor

Check deliverability authentication for thousands of domains. Input: domains. Output (JSON/CSV): one row per item with domain, exists, score, grade, mailProvider, mx, nullMx, spf, dmarc, dkim.

- **URL**: https://apify.com/mediapro-tools/email-domain-auth-audit.md
- **Developed by:** [Jeremy Yarbrough](https://apify.com/mediapro-tools) (community)
- **Categories:** Developer tools, Lead generation, Marketing
- **Stats:** 2 total users, 1 monthly users, 0.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

## Bulk Email Domain Audit: SPF, DKIM, DMARC, MX, BIMI, MTA-STS

Paste a list of domains (or email addresses) and get a **deliverability authentication report card** for each: **score, A–F grade, and a plain-English fix list**. It checks what Gmail, Yahoo and Microsoft require from senders:

- **SPF:** missing or duplicate records, `+all`/`?all`, and the **10-DNS-lookup limit counted through every nested include**, the most common hidden cause of SPF permerror.
- **DMARC:** present, policy (`none`/`quarantine`/`reject`), `pct`, reporting (`rua`), alignment.
- **DKIM:** probes **60+ common selectors** (Google, Microsoft 365, SendGrid, Mailchimp, Klaviyo, HubSpot, Amazon SES, Zoho, Hostinger, Resend…), reports key size, and flags 1024-bit keys and revoked or wildcard keys.
- **MX / mail provider** (Google Workspace, Microsoft 365, Proofpoint, Mimecast, Zoho, and more) plus **sending platforms** inferred from SPF.
- **BIMI, MTA-STS, TLS-RPT**, and a single `bulkSenderReady` flag.
- **Monitor mode:** schedule it and get alerted when any domain's SPF, DMARC, DKIM, MX or grade changes.

### Who it's for

- **Cold-email and outbound teams:** audit every sending domain and inbox-rotation domain before warming it.
- **Agencies and MSPs:** one report across all client domains, re-run weekly to catch breakage.
- **Lead-gen / sales intel:** segment prospects by mail provider (Google vs Microsoft vs gateway like Proofpoint) and email maturity.
- **Security teams:** watch for DMARC downgrades or SPF changes on your own brands.

### Input

```json
{"domains":["acme.com","jane@globex.com"],"extraDkimSelectors":["mycustom2024"],"monitorMode":false}
```

### Output (trimmed)

```json
{"domain":"therealtour360.com","grade":"B","score":87,"mailProvider":"Hostinger","bulkSenderReady":true,
 "spf":{"record":"v=spf1 include:_spf.mail.hostinger.com ~all","all":"softfail","lookups":3},
 "dmarc":{"policy":"none","rua":null},"dkim":{"found":[{"selector":"hostingermail-a","approxKeyBits":2048}]},
 "issues":[{"severity":"medium","code":"DMARC_P_NONE","message":"DMARC is monitor-only (p=none)..."},
           {"severity":"low","code":"DMARC_NO_RUA","message":"No rua= reporting address..."}]}
```

### How it works and limits

- **Public DNS only** (DNS-over-HTTPS via Cloudflare with Google as fallback). It never connects to mail servers, sends email, or checks mailboxes, so it's safe to run on any domain.
- **DKIM:** DNS can't list selectors, so a domain that signs with a custom selector shows `DKIM_NOT_FOUND`. Add the selector from a real email header (`DKIM-Signature: s=...`) via `extraDkimSelectors`. Big senders (e.g. google.com) rotate dated selectors and will show this.
- Key size is estimated from the public key length (±, good enough to spot 1024-bit keys).
- No blocklist (DNSBL) checks: the major lists forbid commercial use through public resolvers.

### Related tools

- [Bulk Email Validator: Syntax, MX, Disposable & Role Check](https://apify.com/mediapro-tools/bulk-email-validator-mx)
- [Bulk DNS Lookup & DNS Change Monitor](https://apify.com/mediapro-tools/bulk-dns-lookup-monitor)
- [Website Contact Details Extractor: Emails, Phones & Socials](https://apify.com/mediapro-tools/website-contact-details-extractor)
- [Bulk HTTP Security Headers Checker & Grade (with change alerts)](https://apify.com/mediapro-tools/security-headers-checker-bulk)
- [Bulk Domain WHOIS (RDAP) Lookup: Age, Expiry, Registrar & DNS](https://apify.com/mediapro-tools/domain-whois-rdap-bulk)

# Actor input Schema

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

Domains (acme.com) or emails (jane@acme.com, where only the domain part is used). Duplicates are removed.

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

Custom selectors to test on top of the 60+ built-in common ones (find yours in an email header: DKIM-Signature s=...).

## `monitorMode` (type: `boolean`):

Reports changes to grade, provider, SPF, DMARC, DKIM selectors, MX, BIMI, MTA-STS.

## `onlyChanged` (type: `boolean`):

Monitor mode only.

## `stateStoreName` (type: `string`):

Named key-value store for snapshots.

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

Domains audited in parallel (each takes about 70 DNS queries, mostly cached).

## Actor input object example

```json
{
  "domains": [
    "stripe.com",
    "github.com"
  ],
  "monitorMode": false,
  "onlyChanged": false,
  "stateStoreName": "email-domain-audit-monitor",
  "maxConcurrency": 5
}
```

# Actor output Schema

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

All result records in the default dataset (table view: overview).

## `files` (type: `string`):

Files saved by this run (download links are also in each result record).

## `summary` (type: `string`):

Counts and stats for this run (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": [
        "stripe.com",
        "github.com"
    ]
};

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

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

```

## MCP server setup

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