# B2B Domain Email Security Auditor (SPF / DMARC / DKIM / MX) (`invaluable_rondeau/b2b-domain-email-security-auditor`) Actor

Audit up to 1,000 corporate domains per run for email gateway provider (Google Workspace, Microsoft 365, Proofpoint, Mimecast), SPF policy, DMARC enforcement, DKIM selectors, BIMI, and configuration drift.

- **URL**: https://apify.com/invaluable_rondeau/b2b-domain-email-security-auditor.md
- **Developed by:** [PROOFNEXA](https://apify.com/invaluable_rondeau) (community)
- **Categories:** Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 corporate 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

## B2B Domain Email Security & Deliverability Auditor (SPF / DMARC / DKIM / MX)

Audit up to **1,000 corporate domains per run** for email deliverability posture, email gateway provider classification (`google_workspace`, `microsoft_365`, `proofpoint`, `mimecast`, `cloudflare`, `amazon_ses`, `zoho`), SPF enforcement, DMARC policy (`reject` / `quarantine` / `none`), active DKIM selectors, BIMI presence, and stateful DNS configuration drift.

> **Companion B2B Email & Lead Tools:**
>
> - Discover verified corporate email addresses from a person's name + company domain: **[Corporate Email Finder & Verifier (`invaluable_rondeau/corporate-email-finder-verifier`)](https://apify.com/invaluable_rondeau/corporate-email-finder-verifier)**
> - Pre-send B2B email hygiene gate (`allow` / `review` / `suppress`): **[B2B Email Deliverability Risk Gate (`invaluable_rondeau/b2b-email-deliverability-risk-gate`)](https://apify.com/invaluable_rondeau/b2b-email-deliverability-risk-gate)**
> - High-volume MX verification up to 50,000 emails at `$0.001`/email: **[Bulk Email Verifier (`invaluable_rondeau/email-verifier-bulk`)](https://apify.com/invaluable_rondeau/email-verifier-bulk)**

### Why Use This Actor?

- **Lead Segmentation by Email Gateway**: Filter B2B prospect lists by whether they use Google Workspace, Microsoft 365, or strict enterprise gateways (Proofpoint / Mimecast) before launching outreach.
- **Sender Domain Hygiene & Spoofing Audit**: Verify that all your outbound domains and client domains have valid single-record SPF (`-all` / `~all`), enforced DMARC (`p=quarantine` / `p=reject` + `rua`), and active DKIM keys.
- **Scheduled Drift Detection**: Set `stateId` and schedule weekly runs to catch accidental SPF/DMARC regressions (`changeType: "changed"`).

### Input Example

```json
{
  "domains": [
    "microsoft.com",
    "apify.com",
    "github.com"
  ],
  "dkimSelectors": ["default", "google", "selector1", "selector2", "k1", "s1"],
  "stateId": "weekly-domain-audit",
  "timeoutMs": 2000
}
```

### Output Example

```json
{
  "domain": "apify.com",
  "isValidDomain": true,
  "hasMx": true,
  "mxProvider": "google_workspace",
  "mxHosts": ["aspmx.l.google.com", "alt1.aspmx.l.google.com"],
  "spfPresent": true,
  "spfPolicy": "softfail (~all)",
  "dmarcPresent": true,
  "dmarcPolicy": "reject",
  "dkimSelectorsFound": ["google"],
  "hasBimi": false,
  "score": 95,
  "verdict": "strong",
  "findings": [],
  "recommendations": [],
  "fingerprint": "9f81c3a04b12e7d1",
  "changeType": "baseline",
  "isBillable": true,
  "checkedAt": "2026-10-20T04:00:00.000Z"
}
```

### Pricing (Pay-Per-Event)

- **Event**: `domain-audited` (`$0.005` per valid domain audited — `$5.00` per 1,000 domains).
- Duplicate domains are automatically deduplicated before auditing, and malformed domain strings are not charged.

***

### AI Agent (MCP) & Automation Integration (Claude, Cursor, n8n, Clay, Make)

This Actor is **Agentic-Payment & MCP Ready** (`LIMITED_PERMISSIONS`, `256 MB` fast cold-start, synchronous JSON output).

#### 1. Claude Desktop / Cursor / Windsurf MCP Configuration

Add to `claude_desktop_config.json` or `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "apify-b2b-quant": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "invaluable_rondeau/b2b-domain-email-security-auditor"
      ],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

#### 2. Synchronous HTTP Webhook (n8n, Make, Clay, Zapier, cURL)

Call the synchronous dataset endpoint to get clean JSON items in a single HTTP request:

```bash
curl -X POST "https://api.apify.com/v2/acts/invaluable_rondeau~b2b-domain-email-security-auditor/run-sync-get-dataset-items?token=$APIFY_TOKEN&memory=256&clean=true" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 3. Search Keywords & Supported Workflows

Compatible with **Model Context Protocol (MCP)**, **Clay.com HTTP API enrichment**, **n8n HTTP Request node**, **Make.com**, **Zapier**, **LangChain**, and **OpenAI Agent SDK**. Built as a high-margin, pay-per-event alternative to rigid monthly SaaS subscriptions (MXToolbox, EasyDMARC, Valimail, dmarcian, SecurityTrails alternative for bulk SPF, DMARC, DKIM, BIMI, MTA-STS, and MX security auditing).

# Actor input Schema

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

Up to 1,000 corporate domains (or URLs / email addresses from which domains are automatically extracted). CSV/newline text is also supported via API.

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

Common DKIM selectors checked at <selector>.\_domainkey.<domain>.

## `stateId` (type: `string`):

Optional identifier used to persist baseline DNS fingerprints in Key-Value Store and detect SPF/DMARC/MX drift across scheduled runs.

## `timeoutMs` (type: `integer`):

Per-query DNS timeout in milliseconds.

## Actor input object example

```json
{
  "domains": [
    "microsoft.com",
    "apify.com",
    "github.com"
  ],
  "dkimSelectors": [
    "default",
    "google",
    "selector1",
    "selector2",
    "k1",
    "s1"
  ],
  "stateId": "default",
  "timeoutMs": 2000
}
```

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,invaluable_rondeau/b2b-domain-email-security-auditor"
        }
    }
}
```

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/XtXhK1d82ch3U11GO/builds/FWYeXi3QspfCW4Pw8/openapi.json
