[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75650":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},75650,"e2a","Mnexa-AI\u002Fe2a","Mnexa-AI","Authenticated email gateway for AI agents — SPF\u002FDKIM verified inbound, HMAC-signed delivery, webhook + WebSocket fan-out, CLI + SDKs","https:\u002F\u002Fe2a.dev",null,"Go",157,7,1,19,0,3,8,110,9,2.71,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33,34,35],"ai-agents","email","email-api","go","hitl","human-in-the-loop","mail-gateway","smtp","webhook","2026-06-12 02:03:35","# e2a — Email for AI agents\n\n[![Tests](https:\u002F\u002Fgithub.com\u002FMnexa-AI\u002Fe2a\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002FMnexa-AI\u002Fe2a\u002Factions\u002Fworkflows\u002Ftest.yml)\n[![Build image](https:\u002F\u002Fgithub.com\u002FMnexa-AI\u002Fe2a\u002Factions\u002Fworkflows\u002Fbuild-image.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002FMnexa-AI\u002Fe2a\u002Factions\u002Fworkflows\u002Fbuild-image.yml)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FMnexa-AI\u002Fe2a)](LICENSE)\n[![npm @e2a\u002Fsdk](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F%40e2a%2Fsdk?label=%40e2a%2Fsdk)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@e2a\u002Fsdk)\n[![PyPI e2a](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fe2a)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fe2a\u002F)\n\n\u003Ca href=\"https:\u002F\u002Fwww.producthunt.com\u002Fproducts\u002Fe2a-open-source-email-api-for-agents?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-e2a-open-source-email-api-for-agents\" target=\"_blank\" rel=\"noopener noreferrer\">\u003Cimg alt=\"e2a – open-source email API for agents - Give your AI agents a real, authenticated email address. | Product Hunt\" width=\"250\" height=\"54\" src=\"https:\u002F\u002Fapi.producthunt.com\u002Fwidgets\u002Fembed-image\u002Fv1\u002Ffeatured.svg?post_id=1145559&theme=light&t=1778615217650\">\u003C\u002Fa>\n\nAuthenticated email gateway for AI agents. Receive emails as webhooks or via WebSocket, send emails through an HTTP API, and verify the identity of every sender — humans and other agents alike.\n\n- **Authenticated transport** — SPF\u002FDKIM verified on inbound; HMAC-signed `X-E2A-Auth-*` headers on every delivery\n- **Two delivery modes** — webhook (cloud agents) or WebSocket (local agents, no public URL needed)\n- **Outbound API** — agents send to other agents (SMTP relay) or humans (upstream SMTP, e.g. SES, Resend)\n- **Human in the loop** — opt-in approval gate that holds outbound mail until a reviewer approves via dashboard, magic-link email, or CLI\n- **CLI + SDKs** — TypeScript and Python SDKs, plus a `e2a` CLI for everyday agent ops\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fb55a8f18-6470-44e3-a053-97dfb787228c\" controls autoplay muted loop width=\"800\">\u003C\u002Fvideo>\n\n## Use it\n\nYou can either use the hosted instance or self-host.\n\n- **Hosted** — sign up at [e2a.dev](https:\u002F\u002Fe2a.dev). Includes the shared `agents.e2a.dev` domain for instant slug-based onboarding (no DNS setup), a dashboard, and managed deliverability.\n- **Self-host** — see [Quickstart](#quickstart) and [Deployment](#deployment). Every feature works the same; the shared-domain slug shortcut just needs you to point a mail domain at your relay and set `shared_domain` in `config.yaml`.\n\n## How it works\n\n```\nHuman (Gmail\u002FOutlook)\n    │\n    ▼ SMTP\n┌──────────────┐\n│   e2a relay   │  ← MX record for your agent domain points here\n│              │\n│  1. Verify   │  ← SPF\u002FDKIM check on the inbound message\n│  2. Sign     │  ← HMAC-signed X-E2A-Auth-* headers\n│  3. Deliver  │\n└──────────────┘\n    │\n    ├──▶ Cloud-mode agent: HTTPS webhook POST\n    │\n    └──▶ Local-mode agent: store + WebSocket notification\n              │\n              ▼\n         e2a listen (CLI) or client.listen() (SDK)\n```\n\nInbound flow: SMTP → SPF\u002FDKIM check → agent lookup → HMAC-sign auth headers → webhook or WebSocket delivery.\n\nOutbound flow: API call → optional HITL hold → SMTP relay (agent-to-agent) or upstream SMTP (agent-to-human).\n\n## Quickstart\n\nRequires Docker.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FMnexa-AI\u002Fe2a.git\ncd e2a\ndocker compose up -d\n```\n\nPostgres comes up first (migrations run automatically), then the API server, then the dashboard. Three host ports:\n\n- `:8080` — HTTP API\n- `:2525` — SMTP relay\n- `:3000` — Dashboard (Caddy + Next.js, proxies `\u002Fapi\u002F*` to the API server)\n\nHealth check:\n\n```bash\ncurl http:\u002F\u002Flocalhost:8080\u002Fapi\u002Fhealth\n# {\"status\":\"ok\"}\n```\n\nOpen `http:\u002F\u002Flocalhost:3000` in a browser to view the dashboard. Sign-in requires Google OAuth credentials configured in `config.yaml`; for an API-only smoke test you can skip the dashboard and use the bootstrap flow below.\n\nCreate your first user and API key (no OAuth required):\n\n```bash\ndocker compose exec e2a e2a -config \u002Fetc\u002Fe2a\u002Fconfig.yaml -bootstrap-email you@example.com\n# User:    you@example.com (id=...)\n# API key: e2a_...\n```\n\nSave the key — it's only shown once. Register an agent and confirm it works:\n\n```bash\nKEY=e2a_...\ncurl -X POST http:\u002F\u002Flocalhost:8080\u002Fapi\u002Fv1\u002Fagents \\\n  -H \"Authorization: Bearer $KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"slug\":\"my-bot\",\"agent_mode\":\"local\"}'\n\ncurl -H \"Authorization: Bearer $KEY\" http:\u002F\u002Flocalhost:8080\u002Fapi\u002Fv1\u002Fagents\n```\n\nTo receive real inbound mail, point a domain's MX record at your relay host:\n\n- **A**: `your-domain.com` → server IP\n- **MX**: `your-domain.com` → `your-domain.com` (priority 10)\n\nThen register and verify the domain through the API (see [Domains](#domains)). Without DNS, the API still works for testing — but external email won't reach your relay.\n\n> **Upgrades and migrations.** The compose file mounts `migrations\u002F` into Postgres' init directory, which only runs on first start (when the data volume is empty). When you upgrade e2a and pull a new schema migration, you must apply it manually:\n> ```bash\n> docker compose exec postgres sh -c \\\n>   'for f in \u002Fdocker-entrypoint-initdb.d\u002F*.sql; do psql -U e2a -d e2a -f \"$f\" -v ON_ERROR_STOP=1; done'\n> ```\n> The migration files are idempotent (`CREATE TABLE IF NOT EXISTS`, `ALTER TABLE … ADD COLUMN IF NOT EXISTS`) so re-running them is safe.\n\n## Concepts\n\n### Agent modes\n\nAgents operate in one of two modes, set via `agent_mode` at registration:\n\n| Mode | Delivery | Public URL needed? |\n|------|----------|---------------------|\n| `cloud` (default) | HTTPS webhook POST to `webhook_url` | Yes |\n| `local` | WebSocket notification + REST fetch | No |\n\nLocal-mode agents accumulate \"unread\" messages while disconnected; on reconnect, the server drains them as WebSocket notifications. Both modes can also poll messages via the REST API.\n\n### Auth headers\n\nEvery email delivered through e2a (webhook or WebSocket-fetched) carries signed headers:\n\n| Header | Description |\n|--------|-------------|\n| `X-E2A-Auth-Verified` | `true` if domain-level auth (SPF or DKIM) passed |\n| `X-E2A-Auth-Sender` | Verified sender email or agent domain |\n| `X-E2A-Auth-Entity-Type` | `human` or `agent` |\n| `X-E2A-Auth-Domain-Check` | SPF\u002FDKIM result string (e.g. `spf=pass; dkim=none`) |\n| `X-E2A-Auth-Delegation` | `agent={id};human={id}` if an active delegation binding exists |\n| `X-E2A-Auth-Timestamp` | RFC3339 timestamp |\n| `X-E2A-Auth-Message-Id` | Internal e2a message ID this delivery is for |\n| `X-E2A-Auth-Body-Hash` | Hex SHA-256 of the raw message bytes |\n| `X-E2A-Auth-Signature` | HMAC-SHA256 over a canonical string of the above |\n\nThe signature covers:\n\n```\nverified \\n sender \\n entity_type \\n domain_check \\n delegation \\n timestamp \\n message_id \\n body_hash\n```\n\nThe MAC binds to **both** `message_id` and a SHA-256 of the raw message body. Substituting either invalidates the signature, so an attacker who captures one delivery cannot replay the auth claim on a different message or under a modified body.\n\n#### Verifying the signature\n\nThe `X-E2A-Auth-Verified` field is the *server's claim* — anyone who can reach your webhook URL can set it. To make a security decision, **verify the signature** with one of your account's signing secrets (manage them in the dashboard's Settings → Webhook signing secrets, or via `\u002Fapi\u002Fv1\u002Fusers\u002Fme\u002Fsigning-secrets`).\n\nThe SDKs gate field access behind verification by default — accessing `email.sender`, `email.subject`, etc. on an unverified webhook payload raises `UnverifiedEmailError`, so you can't accidentally trust attacker-controllable fields. The one-call shortcut:\n\n```python\nfrom e2a.v1 import E2AClient\nclient = E2AClient()  # reads E2A_API_KEY\nemail = client.parse_webhook(request_body)  # reads E2A_WEBHOOK_SECRET; raises on bad signature\n# safe to use email.sender, email.subject, …\n```\n\n```typescript\nimport { E2AClient } from \"@e2a\u002Fsdk\";\nconst email = await client.parseWebhook(req.body); \u002F\u002F throws on bad signature\n```\n\nBoth forms read the secret from `E2A_WEBHOOK_SECRET` by default; pass it explicitly as a second argument if you keep it elsewhere. Under the hood the verify step checks, in order: body_hash matches the raw message bytes, HMAC matches the canonical auth string, and timestamp is within a 5-minute replay window.\n\nEmails returned by `client.get_message(...)` are pre-verified — the bearer token already authenticated the channel — so field access works directly without a verify step. (Listing endpoints like `get_messages` \u002F `listMessages` return lightweight summaries, not `InboundEmail`, so the gate doesn't apply.)\n\n### Conversation threading\n\nBoth `send` and `reply` accept an opaque `conversation_id`. e2a propagates it to the recipient on delivery via `payload.conversation_id`, surfaced in this priority order:\n\n1. **`X-E2A-Conversation-Id` header** — authoritative for e2a-to-e2a traffic. Only honored when the SMTP envelope `MAIL FROM` originates from this relay, so external senders cannot forge it.\n2. **`In-Reply-To` \u002F `References` lookup** — standard RFC 5322 threading, scoped to the recipient agent's own messages. Covers humans replying from Gmail\u002FOutlook.\n\nFirst contact from a human arrives with `conversation_id: null` — the agent should assign a new id before replying.\n\n### Human in the loop (HITL)\n\nWhen an agent has HITL enabled, outbound `send` and `reply` calls do **not** dispatch immediately. The message is stored with status `pending_approval` and the API returns HTTP `202 Accepted`. A reviewer must approve it before delivery; otherwise, after a configurable TTL, the message expires into `expired_approved` (auto-sent) or `expired_rejected` (discarded), depending on the agent's `hitl_expiration_action`.\n\nReviewers can approve or reject via:\n\n- **Dashboard \u002F API** — `POST \u002Fapi\u002Fv1\u002Fmessages\u002F{id}\u002Fapprove` or `\u002Freject`\n- **Magic-link email** — sent automatically when HITL fires; one-click `GET \u002Fapi\u002Fv1\u002Fapprove?token=…` and `\u002Freject?token=…` URLs (requires `E2A_PUBLIC_URL` and outbound SMTP configured)\n- **CLI** — `e2a pending` lists held messages\n\nEnable HITL on an agent via `PUT \u002Fapi\u002Fv1\u002Fagents\u002F{email}` with `hitl_enabled: true` and an optional `hitl_expiration_action` and TTL.\n\n## API\n\nAll endpoints are under `\u002Fapi\u002Fv1` unless noted. Auth is `Authorization: Bearer \u003Capi_key>` except for `\u002Fapi\u002Fhealth`, `\u002Fapi\u002Fv1\u002Finfo`, `\u002Fapi\u002Ffeedback`, and the HITL magic-link routes. Path parameters containing `@` (agent emails) must be URL-encoded.\n\nThe surface covers domain registration + verification, agent CRUD, inbound\u002Foutbound messages, HITL approve\u002Freject (API key or signed magic-link token), GDPR-style export and deletion, and a WebSocket channel for local-mode agents.\n\nSee [docs\u002Fapi.md](docs\u002Fapi.md) for the full endpoint reference, or [`web\u002Fpublic\u002Fopenapi.yaml`](web\u002Fpublic\u002Fopenapi.yaml) for the machine-readable spec.\n\n## CLI\n\n```bash\nnpm install -g @e2a\u002Fcli\ne2a login\n```\n\n| Command | Description |\n|---------|-------------|\n| `e2a agents register \u003Cslug>` | Register `\u003Cslug>@\u003Cshared-domain>`. The deployment's shared domain is auto-discovered after `e2a login` and cached in `~\u002F.e2a\u002Fconfig.json`. |\n| `e2a agents list` | List your agents |\n| `e2a agents update \u003Cemail>` | Update an agent (webhook URL, mode, HITL) |\n| `e2a agents delete \u003Cemail>` | Delete an agent |\n| `e2a listen` | Listen for emails over WebSocket (real-time) |\n| `e2a listen --json` | Output one full message JSON per line |\n| `e2a listen --forward \u003Curl>` | Forward each message as HTTP POST to a local URL |\n| `e2a inbox` | List recent messages |\n| `e2a read \u003Cid>` | Read a message |\n| `e2a reply \u003Cid> --body …` | Reply to a message |\n| `e2a send --to … --subject … --body …` | Send an email |\n| `e2a pending` | List HITL messages awaiting approval |\n| `e2a config` | View or update CLI config |\n\nThe `listen --forward` mode also supports OpenAI Responses API forwarding via `--forward-token`, which formats each inbound email as a Responses payload and auto-replies with the model's output:\n\n```bash\ne2a listen --forward http:\u002F\u002Flocalhost:18789\u002Fv1\u002Fresponses --forward-token \u003Ctoken>\n```\n\nSee [cli\u002FREADME.md](cli\u002FREADME.md) for full reference.\n\n## SDKs\n\n### Python\n\n```bash\npip install e2a            # webhook mode\npip install 'e2a[ws]'      # adds WebSocket support\n```\n\n```python\nfrom e2a.v1 import E2AClient\n\nclient = E2AClient()                          # reads E2A_API_KEY\nemail = client.parse_webhook(request_body)    # parse + HMAC-verify (reads E2A_WEBHOOK_SECRET)\nprint(email.sender, email.subject)\nemail.reply(\"Got it!\", conversation_id=\"conv_123\")\n```\n\nWebSocket (local agents):\n\n```python\nfrom e2a.v1 import AsyncE2AClient\n\nasync with AsyncE2AClient(api_key=\"e2a_…\") as client:\n    async for notif in client.listen(\"bot@your-domain.com\"):\n        # notif is lightweight metadata — fetch the body when you want it\n        email = await client.get_message(notif.message_id)\n        await email.reply(\"Got it!\")\n```\n\nSee [sdks\u002Fpython\u002FREADME.md](sdks\u002Fpython\u002FREADME.md).\n\n### TypeScript\n\n```bash\nnpm install @e2a\u002Fsdk\n```\n\nSee [sdks\u002Ftypescript\u002FREADME.md](sdks\u002Ftypescript\u002FREADME.md).\n\n## Deployment\n\nThree audiences each configure a different surface:\n\n| Audience | What they configure | Where |\n|---|---|---|\n| **Server operator** — runs the Go backend | DB, signing key, SMTP, OAuth, optional shared domain | `config.yaml` + `E2A_*` env |\n| **CLI \u002F SDK user** — calls the API from their machine | Just the deployment URL (and login) | `E2A_URL` + `e2a login` |\n| **Web dashboard deployer** — hosts the Next.js dashboard | Public site URL + branding | `NEXT_PUBLIC_*` build-time env |\n\nThe Go binary runs on any container host; storage is plain Postgres 14+; outbound mail goes through standard SMTP. Most workers coordinate via `SELECT … FOR UPDATE SKIP LOCKED`, so multi-replica is safe — the two real horizontal-scaling caveats are in-memory WebSocket fan-out and per-process rate limits.\n\nSee [docs\u002Fdeployment.md](docs\u002Fdeployment.md) for the full env-var reference, shared-domain DNS setup, and scaling\u002Flimitation notes.\n\n## Security\n\n- **Identity** — agent registration requires DNS TXT verification of domain ownership (custom domains)\n- **Domain auth** — SPF and DKIM checked on every inbound message\n- **Header signatures** — HMAC-SHA256 over canonical auth-header string; reject if timestamp older than 5 minutes\n- **SSRF protection** — webhook URLs must be HTTPS (in production), resolve to public IPs, use domain names (no raw IPs, no private\u002Floopback ranges)\n- **OAuth CSRF** — single-use, time-limited nonce in the `state` parameter\n- **Production mode** (`E2A_ENV=production`) enforces the above where development mode is more permissive\n\nReport security issues privately — see [SECURITY.md](SECURITY.md) for the disclosure process and what's in scope. **Do not file public GitHub issues for vulnerabilities.**\n\n## Data handling\n\nMessage envelopes and inbound bodies live in Postgres for 30 days by default; outbound bodies are scrubbed at terminal HITL transition; API keys are stored as hashes; attachments go in JSONB rows (no S3\u002FGCS). Application logs include sender\u002Frecipient addresses (standard MTA practice) but never bodies, attachments, raw keys, or HMAC secrets. Users can self-export (`GET \u002Fusers\u002Fme\u002Fexport`) and self-delete (`DELETE \u002Fusers\u002Fme`) for GDPR Art. 15 \u002F Art. 17 \u002F CCPA.\n\nSee [docs\u002Fdata-handling.md](docs\u002Fdata-handling.md) for the full retention table, log fields, user-rights endpoints, and the operator-side responsibilities (backups, TLS, at-rest encryption, log redaction, compliance).\n\n## FAQ\n\n### Why not just use SendGrid \u002F Resend \u002F Postmark for sending and their inbound parsing for receiving?\n\nFour things that aren't possible to bolt on without significant rework:\n\n1. **Local-mode agents with no public URL.** Agents authenticate with their API key, open a WebSocket to `\u002Fapi\u002Fv1\u002Fagents\u002F{email}\u002Fws`, and inbound mail arrives as JSON over that connection — no webhook URL, no ngrok, no port forward. Useful for agents on developer laptops, edge devices, or behind corporate firewalls. SendGrid\u002FResend are webhook-only by design. A polling REST API is available as fallback.\n\n2. **Conversation threading on every reply.** Whether a human replies from Gmail or another e2a agent replies via the API, the inbound message arrives at the agent with a stable `conversation_id` already mapped to the original thread. For human senders, the relay does standard `In-Reply-To` \u002F `References` lookup scoped to the recipient agent's own messages. For agent-to-agent where both sides are on e2a, it also trusts an `X-E2A-Conversation-Id` header it controls (envelope-from is its own domain), which survives clients that rewrite threading headers. SendGrid\u002FResend never see inbound mail — they aren't receivers — so neither path is available without you building both yourself.\n\n3. **Slug provisioning on a shared domain.** Operators set `shared_domain: agents.e2a.dev` and users `POST {\"slug\": \"my-agent\"}` to immediately get `my-agent@agents.e2a.dev` with no DNS configuration. Possible because e2a *is* the SMTP relay claiming the domain — Resend \u002F SendGrid are providers, not platforms, and can't multi-tenant a shared address space without you running the relay yourself.\n\n4. **Built-in HITL hold + auto-expiration.** A per-agent `hitl_enabled` flag holds outbound mail in `pending_approval` state. Reviewers approve via dashboard, magic-link email, or CLI; a background worker auto-acts on expired holds based on `hitl_expiration_action` config. Magic-link tokens are HMAC-encoded — stateless, no session backend. With Resend \u002F SendGrid you'd hold the message in your own DB, build the timer, the approval UI, and the stateless review tokens.\n\nYou can absolutely use SES \u002F Resend \u002F SendGrid as e2a's *outbound* SMTP for delivery to humans — that's what `outbound_smtp` in `config.yaml` is for. They complement e2a; they don't replace the inbound receiver, agent abstraction, or any of the layers above transport.\n\n### Why email at all? Why not webhooks, gRPC, or MCP between agents?\n\nEmail is the only protocol where every human already has an address and a working client. Webhooks \u002F gRPC \u002F MCP are great inside systems you control, but they don't reach Gmail or Outlook. If you want an agent that talks to humans (or to *other organizations'* agents) without forcing everyone to install a new client, email is the universal substrate.\n\ne2a doesn't replace webhooks — agents *receive* email via webhooks. It bridges email's universal addressability to the structured-data world the agent code already lives in.\n\n### What stops an attacker from spoofing the `X-E2A-Auth-*` headers?\n\nThe relay strips any incoming `X-E2A-Auth-*` from inbound messages and re-signs with HMAC-SHA256 against `signing.hmac_secret`. The signed canonical binds `Sender + Verified + Body-Hash + Message-Id` together — replay attempts, body swaps, and sender-only forgery all fail validation. Each delivery is bound to *that specific message body*, not just the sender claim, so a captured `(headers, signature)` tuple can't be lifted onto a different message.\n\nReceivers verify with the SDK — `client.parse_webhook(body)` \u002F `client.parseWebhook(body)` does parse + HMAC verify in one call (or `email.verify_signature(secret)` if you parsed first). No API call back to e2a needed. If a signing secret leaks, rotate it via the dashboard and old signatures stop verifying. If it's *stolen from the relay*, the attacker has bigger access than headers anyway.\n\n### Isn't this just SMTP with extra steps?\n\nYes — and the extra steps are the point. Concretely:\n\n- SPF\u002FDKIM verdict normalization so receivers don't reimplement domain auth\n- HMAC-signed delivery contract binding sender, body hash, message ID, and verification status\n- WebSocket transport for agents without public URLs\n- HITL approval flow with auto-expiration and stateless magic-link review\n- Conversation-Id threading that survives the email ↔ structured-data boundary\n- Slug-based agent provisioning on a shared domain\n- Per-agent webhook routing, rate limits, and HITL config\n\nBuilding those on top of bare Postfix is a real project. e2a is that project, open source.\n\n### How does this compare to running Postfix or Postal myself?\n\nIf you want a full MTA, run an MTA — Postfix and Postal are great. e2a isn't trying to replace them at the SMTP transport level (it uses `go-smtp` for receiving and dial-out for sending). The value is the layer above transport: the auth model, agent abstraction, signed delivery contract, retry policy for webhook failures, HITL approval flow, SDKs and CLI. If you're comfortable operating an MTA and only need email plumbing, e2a may be more than you want. If you want the agent abstraction and signed identity layer prebuilt, that's what this is.\n\n### Why open source if there's a hosted version?\n\nTwo reasons:\n\n1. **Auditability.** Identity infrastructure for your agents should be readable code, not a vendor black box. You can verify the cosign signature on `ghcr.io\u002Fmnexa-ai\u002Fe2a`, reproduce the build, and confirm what's actually running.\n2. **Self-host as a real option.** The hosted instance at e2a.dev runs the same `ghcr.io\u002Fmnexa-ai\u002Fe2a` image you can pull right now. Convenience features on the hosted side (the shared `agents.e2a.dev` domain, managed deliverability) are config + DNS, not closed-source extras.\n\nPricing for the hosted version isn't enabled yet. When it lands, it'll be opt-in via env var and the OSS code path stays unchanged.\n\n## Development\n\n```bash\nmake build               # go build -o bin\u002Fe2a .\u002Fcmd\u002Fe2a\nmake run                 # build + run (cp config.example.yaml config.yaml first)\nmake test                # all Go tests (needs Postgres on :5433)\nmake test-unit           # Go unit tests only (no DB)\nmake test-integration    # integration tests (needs Postgres)\nmake test-e2e            # e2e tests (needs Postgres)\nmake docker-up           # start local Postgres via docker compose\nmake migrate             # apply SQL migrations to local DB\n```\n\nSee [CLAUDE.md](CLAUDE.md) for the full developer guide (architecture, tests, code generation, conventions).\n\n## Contributing\n\nBy submitting a pull request, you certify the [Developer Certificate of Origin](https:\u002F\u002Fdevelopercertificate.org\u002F) for your contribution. Sign your commits with `git commit -s`.\n\n## License\n\nApache 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).\n","e2a 是一个专为AI代理设计的认证电子邮件网关，支持SPF\u002FDKIM验证的入站邮件、HMAC签名的邮件投递以及通过webhook和WebSocket进行消息分发。其核心功能包括两种投递模式（webhook适用于云代理，WebSocket适合本地代理），提供HTTP API用于发送邮件，并且支持人工审核机制来控制外发邮件。此外，项目还提供了TypeScript和Python SDK以及命令行工具以方便日常操作。e2a适用于需要给AI系统赋予真实且经过身份验证的电子邮件地址的应用场景，如客户服务自动化、智能助手等，既可以通过托管服务快速上手，也支持自部署以满足特定需求。",2,"2026-06-11 03:53:03","CREATED_QUERY"]