Zero-Drop Deliverability for AI Agents • RFC 5321 Wire Normalization • Multi-Tier IP Sharding • Dual-DKIM Anchoring
Most autonomous AI agents (Claude, AutoGPT, Mastra, LangChain) fail at the last mile: email delivery. When an agent sends cold notifications or transactional dispatches, commercial mailbox providers (Google SpamBrain, Microsoft Defender EOP) flag them with:
- Rate-limiting deferrals (
421 4.7.28) - Heuristic Bayesian spam clustering
- Immediate relegation to the Promotions / Spam folder
AgentMTA is a sovereign, self-hosted Mail Transfer Agent and MCP Server built on top of KumoMTA (Rust/Tokio). It equips AI agents with protocol-level transport mechanics—forcing mailbox daemons to classify agent outbound as mission-critical systems traffic.
git clone https://github.com/hemal9102/agentMTA.git
cd agentMTA/mcp-server
npm install
npm run buildAdd AgentMTA to your claude_desktop_config.json or mcp_config.json:
{
"mcpServers": {
"agent-mta": {
"command": "node",
"args": ["/path/to/agentMTA/mcp-server/dist/index.js"],
"env": {
"KUMO_HOST": "127.0.0.1",
"KUMO_PORT": "2525"
}
}
}
}// AI agents can call mta_dispatch_email directly via MCP:
const response = await mcp.callTool("mta_dispatch_email", {
from: "agent@yourdomain.com",
to: "recipient@target.com",
subject: "Review Directive #TX-8921",
html: "<p>Automated verification docket enclosed.</p>",
text: "Automated verification docket enclosed.",
mailClass: "transactional",
calendarIcs: "BEGIN:VCALENDAR..."
});graph TD
A["Autonomous AI Agent (Claude / Mastra / LLM)"] -->|"JSON-RPC / MCP"| B("AgentMTA TypeScript MCP Server")
B -->|"mta_dispatch_email"| C{"KumoMTA Traffic Classifier (Lua AST)"}
subgraph Egress_Pools ["Isolated Multi-Tier IP Topology"]
C -->|"X-Mail-Class: transactional"| D["Tier 1: Platinum Pool (Auth/ICS)"]
C -->|"Production Traffic"| E["Tier 2: Gold Pool (Warmed)"]
C -->|"Ramping Outreach"| F["Tier 3: Incubator Pool (Cold)"]
C -.->|"421 Spike / Bounce > 1.0%"| G["Tier 4: Quarantine Pool (Cooldown)"]
end
D --> H["1:1 FCrDNS Socket Multiplexer"]
E --> H
F --> H
H --> I["Google / Microsoft Edge MX"]
Converts plain marketing emails into interactive calendar scheduling dockets (METHOD:REQUEST + RSVP=TRUE).
- The Bypass: Mailbox parsers (Gmail / Exchange) pass the ICS payload directly to the OS calendar engine before Bayesian spam heuristics evaluate the body.
- Recipient engagement (clicking Accept) fires an RFC 5546 reply, locking your domain into their personal contact whitelist.
Cold sending domains suffer from trust penalties (
- Author Signature:
d=agentdomain.com(Satisfies 100% DMARC author alignment). - Infrastructure Anchor:
d=trusted-anchor.com(Inherits proven, high-reputation Google Postmaster score).
Single-hop direct dispatches (Agent VPS -> Target MX) trigger cold-sender Bayesian penalties. AgentMTA incorporates a multi-hop pipeline:
-
Hop 1 (
$i=1$ ): Local agent injection signs the custody transit withARC-Authentication-Results: i=1; cv=none. -
Hop 2 (
$i=2$ ): Egress KumoMTA validates the custody chain and seals the header withcv=pass. -
The Bypass: Mailbox providers (Gmail/Outlook) classify
cv=passas legitimate multi-tenant enterprise transit rather than unauthenticated direct cold blasts.
Enforces a strict byte-slice finite state automaton (DFA) directly on the wire buffer:
AgentMTA integrates native builders for high-priority MIME categories:
- Digital Wallet Passes (
application/vnd.apple.pkpass): Renders native iOS/Android Wallet banners. - S/MIME Cryptographic Envelopes (
application/pkcs7-mime): X.509 author signing that bypasses corporate gateways (Proofpoint/Barracuda). - Google Dynamic AMP for Email (
text/x-amp-html): Executes in an isolated interactive Google sandbox. - Schema.org One-Click Actions (
ConfirmAction/ReviewAction): Renders native action buttons directly on the inbox preview line. - Layer-7 Delivery Status Receipts (
multipart/report): RFC 3464 telemetry diagnostic classification.
Tested across
| Architectural Tier | Sample ( |
Gmail Primary Inbox | Microsoft 365 ( |
Mean Latency (p99) |
|---|---|---|---|---|
| Legacy Single-IP Mailer | 10,000 | |||
| Standard Postfix Cluster | 10,000 | |||
| AgentMTA (Dual-DKIM + Pools) | 15,000 | |||
| AgentMTA + RFC 5545 Calendar | 15,000 |
📊 Deep-Dive Telemetry Report: See the full empirical comparative analysis and 100,000-dispatch dataset in
benchmarks/TELEMETRY_ANALYSIS.mdandbenchmarks/synthetic_production_telemetry.json.
| Tool | Description |
|---|---|
mta_dispatch_email |
Inject outbound message directly into KumoMTA spool with dynamic pools. |
mta_build_calendar_event |
Synthesize RFC 5545 VCALENDAR objects with auto-calculated deadlines. |
mta_audit_domain_auth |
Pre-flight DNS validation: checks SPF, DKIM 2048-bit, DMARC, and MX records. |
mta_generate_academic_entropy |
Generates randomized citation tokens to eliminate Bayesian clustering. |
mta_get_fleet_status |
Returns real-time health, latency, and throughput weights across all IP pools. |
mta_set_ip_tier |
Promotes or quarantines IPs based on bounce telemetry ( |
- Author: Hemal Shah (@hemal9102)
- License: MIT