# Email Spoofability Checker (SPF, DMARC, DKIM, MX) (`kacperkonieczny/email-spoofability-checker`) Actor

Checks whether anyone can send email pretending to be a domain. Grades each domain A-F from public DNS and returns the exact DNS records to change. No emails are sent, no login needed.

- **URL**: https://apify.com/kacperkonieczny/email-spoofability-checker.md
- **Developed by:** [Kacper](https://apify.com/kacperkonieczny) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Spoofability Checker (SPF, DMARC, DKIM, MX)

**Can anyone send email pretending to be this domain?** Give the Actor a list of domains and get, for each one, an A–F grade, the status of every check, the problems found, and the exact DNS record to change.

It reads **public DNS only** (DNS-over-HTTPS). It sends no email, needs no login, and touches nothing on the checked domain.

### What you get per domain

| Field | Meaning |
|---|---|
| `grade` / `gradeLetter` | `A` properly configured · `B` minor gaps · `C` partially protected · `D` effectively spoofable · `F` spoofable today |
| `spoofable` | `true` for D and F |
| `spfStatus`, `spfRecord` | `present`, `missing`, or `permerror_multiple` (more than one SPF record — RFC 7208 says receivers must treat that as an error) |
| `dmarcStatus`, `dmarcPolicy`, `dmarcRecord` | whether DMARC exists and whether it enforces (`quarantine`/`reject`) or only monitors (`none`) |
| `dkimSelectors` | DKIM keys with a usable (non-empty) public key at common selectors; revoked keys and wildcard records are detected and not counted |
| `mxStatus`, `mxRecords` | whether the domain receives mail |
| `problems[]` | each with `severity`, `finding` (plain language) and `fix` (what to publish) |
| `report` | optional Markdown report you can forward as-is |
| `error` | set when a domain could not be graded (e.g. it does not exist) |

### Input

```json
{
  "domains": ["example.com", "https://www.github.com/about", "someone@company.co.uk"],
  "includeMarkdownReport": true,
  "maxConcurrency": 10
}
```

Bare domains, URLs and email addresses are all accepted. Duplicates are removed.

### Typical uses

- **Agencies and MSPs:** audit a client list before onboarding; attach the Markdown report to the proposal.
- **Sales and lead qualification:** find companies whose domain is spoofable today.
- **Security reviews:** check every domain a company owns, including the ones that never send mail.
- **Monitoring:** schedule the Actor weekly and alert when a grade drops.

### What it does not do

- **DKIM is best-effort.** Only common selectors are probed (`google`, `default`, `selector1`, `selector2`, `k1`, `s1`, `mail`). A missing DKIM result does not lower the grade, because the key may live under a custom selector.
- It does not test deliverability, inbox placement or blocklists.
- It does not send test messages and cannot see private DNS.
- A domain that does not exist (NXDOMAIN) is reported as an error, not graded.

### Pricing

Free to run while in early access: you pay only standard Apify platform usage (a few seconds of compute per run). Pay-per-graded-domain pricing will be announced in advance; domains that cannot be graded will never be charged.

### About

Same analyzer as the open-source MCP server [`io.github.Integrity-Os/deliverability-doctor`](https://github.com/Integrity-Os/deliverability-doctor), listed in the official MCP registry. MIT licensed.

# Actor input Schema

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

Domains to check. Bare domains, URLs and email addresses are all accepted; duplicates are removed.

## `includeMarkdownReport` (type: `boolean`):

Adds a ready-to-send, human-readable report to each result.

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

How many domains to check in parallel.

## Actor input object example

```json
{
  "domains": [
    "example.com",
    "github.com"
  ],
  "includeMarkdownReport": true,
  "maxConcurrency": 10
}
```

# Actor output Schema

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

One row per domain: A-F grade, SPF/DMARC/DKIM/MX status, problems with fixes, optional Markdown report.

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

Counts of domains graded and not graded.

# 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("kacperkonieczny/email-spoofability-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": [
        "example.com",
        "github.com",
    ] }

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

```

## MCP server setup

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