# Domain Email & Security Audit: SPF, DMARC, DKIM, MTA-STS (`crystosix/domain-email-security-audit`) Actor

Audit any list of domains for email authentication (SPF with lookup count, DMARC, DKIM, MX provider, MTA-STS, TLS-RPT, BIMI) and web security (HSTS, CSP, CAA, DNSSEC). Grades, Gmail and Yahoo bulk-sender readiness, and fixes. One row per domain.

- **URL**: https://apify.com/crystosix/domain-email-security-audit.md
- **Developed by:** [CrystoSIX Agents](https://apify.com/crystosix) (community)
- **Categories:** Developer tools, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 domain auditeds

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

## Domain Email & Security Audit: SPF, DMARC, DKIM, MTA-STS

Paste a list of domains and get back **one clean row per domain** showing how well it is protected against email spoofing and how well its website is hardened. Every row has a grade, the reason for it and the exact issue to fix.

Built for cold-email and deliverability teams checking sending domains, agencies auditing client lists, security teams watching their own estate, and AI agents that need a fast, structured answer.

### What each row contains

**Email authentication**

- **SPF**: the record, the `all` policy, and the **DNS lookup count** (more than 10 breaks SPF at receivers, a common hidden failure)
- **DMARC**: policy (`none`, `quarantine`, `reject`), subdomain policy, percentage, alignment, and whether reports are requested
- **DKIM**: which common selectors have a published key, plus any selectors you add; revoked keys are flagged
- **MX and mail provider**: Google Workspace, Microsoft 365, Proofpoint, Mimecast and more, detected from MX records
- **MTA-STS** mode, **TLS-RPT** and **BIMI**
- **Bulk-sender ready**: whether the domain meets the Gmail and Yahoo sender rules for SPF or DKIM plus DMARC

**Web security**

- HTTPS response, **HSTS**, **Content Security Policy**, clickjacking protection, MIME sniffing, referrer policy, version banners
- **CAA** (which certificate authorities may issue) and **DNSSEC**

**Summary**: overall grade A to F, separate email and web grades, and a short list of **critical issues**.

### Input

| Field | Meaning |
|---|---|
| `domains` | Domains to audit, one per line. URLs and email addresses are accepted. Up to 1,000 per run. |
| `dkimSelectors` | Optional extra DKIM selectors used by your sender. |

### Pricing

You pay per domain audited. Domains that are invalid or cannot be reached are skipped and **not charged**.

### How it works

Passive checks only: DNS-over-HTTPS lookups, one HTTPS request for response headers, and the MTA-STS policy file if the domain declares one. No port scans, no login attempts, no email is sent.

### Ideas

- **Before a cold-email campaign**: audit every sending domain and fix SPF lookups or a missing DMARC first.
- **Lead lists**: find companies with `p=none` or no DMARC and offer them help.
- **Monitoring**: schedule weekly on your own domains and alert when a grade drops.

For AI agents: the same audit is available per call with x402 (USDC on Base, no account) at [crystosi.com](https://crystosi.com/llms.txt).

# Actor input Schema

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

Domains to audit, one per line. URLs and email addresses are fine too: the domain is taken from them. Up to 1,000 per run.

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

Optional. Common selectors (google, selector1, selector2, default, k1, s1, fm1, protonmail) are always checked. Add your own sender's selectors here, up to 4.

## `crystosiTest` (type: `boolean`):

Used by CrystoSIX test runs only.

## Actor input object example

```json
{
  "domains": [
    "github.com",
    "stripe.com",
    "shopify.com"
  ]
}
```

# Actor output Schema

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

One audited domain per row: grades, email authentication, web security and critical issues.

# 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": [
        "github.com",
        "stripe.com",
        "shopify.com"
    ]
};

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

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

```

## MCP server setup

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