# Bulk SPF / DMARC / MX Auditor (`sysadmin-toolbox/email-security-audit`) Actor

Audit hundreds of domains for email-spoofing risk. Returns SPF, DMARC policy, MX hosts, flagged issues, and a 0-100 score. Built for MSPs, sales prospecting, and security teams.

- **URL**: https://apify.com/sysadmin-toolbox/email-security-audit.md
- **Developed by:** [SysAdmin Toolbox](https://apify.com/sysadmin-toolbox) (community)
- **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. 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 SPF / DMARC / MX Auditor

Audit hundreds or thousands of domains for email-spoofing risk in one run. For each domain you get the SPF record and its `all` policy, the DMARC policy (`p=`), MX hosts, a list of flagged issues, and a 0-100 score.

### Who it's for

- **MSPs and IT consultants** checking client domains or prospecting new clients
- **Sales and lead-gen teams** qualifying prospects with weak email security
- **Security teams** monitoring a domain portfolio

### Input

- `domains`: a list of domains. URLs and email addresses are cleaned to the bare domain, and duplicates are removed (up to 10,000).
- `concurrency` (optional): parallel lookups, default 10, max 50.

```json
{ "domains": ["google.com", "example.com"] }
```

### Output

One dataset row per domain:

```json
{
  "domain": "example.com",
  "spf": "v=spf1 -all",
  "spfAll": "-all",
  "dmarcPolicy": "reject",
  "mx": [],
  "nullMx": true,
  "issues": [],
  "score": 100,
  "checkedAt": "2026-10-15T01:00:00.000Z"
}
```

Flagged issues include missing SPF, `+all` or no `all`, multiple SPF records, missing DMARC or a missing `p=`, `p=none`, and no MX. Domains that fail DNS lookup land under `errors` with `score: null`, so you never get a false "missing record" result.

### Pricing

Pay per event: **$2 per 1,000 domains audited** ($0.002 each). Lookups that error out aren't charged.

### Notes

Lookups use system DNS with a DNS-over-HTTPS fallback. Results show public DNS at run time.

# Actor input Schema

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

Domains to audit (URLs and emails are normalized).

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

Parallel lookups

## Actor input object example

```json
{
  "domains": [
    "example.com",
    "github.com"
  ],
  "concurrency": 10
}
```

# Actor output Schema

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("sysadmin-toolbox/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": [
        "example.com",
        "github.com",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sysadmin-toolbox/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/RutcYeWjKcNkxybpf/builds/9zCt0nSVfkIEzqPMh/openapi.json
