# Email Security DNS Validator (DMARC/SPF/DKIM) (`sootesting/email-security-dns-validator`) Actor

Validate a domain's email authentication DNS records - DMARC, SPF and DKIM - in one batch. Flags missing or unenforced policies so your outbound mail stops landing in spam. Pay-per-event: $0.01 per batch of up to 200 domains.

- **URL**: https://apify.com/sootesting/email-security-dns-validator.md
- **Developed by:** [soot](https://apify.com/sootesting) (community)
- **Categories:** Developer tools, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Email Security DNS Validator (DMARC/SPF/DKIM)

Validate a domain's email authentication DNS records - DMARC, SPF and DKIM - in one batch. Flags missing or unenforced policies so your outbound mail stops landing in spam.

### What it does

This Actor automates a task that would otherwise take hours of manual work. It is built for **batch processing** — run it once on a list of inputs and get a structured, downloadable report.

### Features

- <b>Batch processing</b> — handle one or many inputs in a single run
- <b>Structured output</b> — clean, ready for CSV/JSON export
- <b>Pay-per-event pricing</b> — you only pay for what you use
- <b>API & CLI ready</b> — integrate it into any workflow

### Input configuration

<table>
<thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>domains</code></td><td>array</td><td>Optional</td><td>List of domains to validate for DMARC, SPF, DKIM.</td></tr><tr><td><code>domain</code></td><td>string</td><td>Optional</td><td>Single domain (backward compatibility).</td></tr><tr><td><code>dkimSelectors</code></td><td>array</td><td>Optional</td><td>Custom DKIM selectors to probe (default: common list).</td></tr>
</tbody>
</table>

### Usage example

#### Run via Apify API (cURL)

```bash
curl -X POST "https://api.apify.com/v2/acts/sootesting~email-security-dns-validator/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}
'
```

#### Run via Apify CLI

```bash
apify run --actor-name sootesting~email-security-dns-validator --input '{}
'
```

### Output schema

The Actor produces the following structured data:

<table>
<thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>domain</code></td><td>string</td><td>Validated domain</td></tr><tr><td><code>spf_present</code></td><td>boolean</td><td>Whether an SPF (v=spf1) TXT record exists</td></tr><tr><td><code>dmarc_present</code></td><td>boolean</td><td>Whether a DMARC (_dmarc) policy exists</td></tr><tr><td><code>dkim_present</code></td><td>boolean</td><td>Whether a DKIM (_domainkey) record was found</td></tr><tr><td><code>email_security_score</code></td><td>integer</td><td>0-100 score (20 pts lost per issue)</td></tr><tr><td><code>issues</code></td><td>array</td><td>List of detected configuration issues</td></tr>
</tbody>
</table>

### Pricing

Pay-per-event: $0.01 per batch of up to 200 domains, plus a small per-start fee. You are only charged for successful events.

### Related

Part of the <b>Sootesting SEO & Data Toolkit</b> — a suite of focused actors for technical SEO, security auditing, and data extraction.

<sub>Generated with structured, semantic formatting for maximum readability in Apify Store.</sub>

# Actor input Schema

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

List of domains to validate for DMARC, SPF and DKIM DNS records.

## `domain` (type: `string`):

Single domain (backward compatibility).

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

Optional custom DKIM selectors to probe. Defaults to a common list.

## Actor input object example

```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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sootesting/email-security-dns-validator").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sootesting/email-security-dns-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call sootesting/email-security-dns-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sootesting/email-security-dns-validator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/KAwLSBWFJA0XkedlN/builds/UWdVsgJYcKmn1VbEG/openapi.json
