Comparison By finedesignz

AgentMail Alternative: Why We Built Our Own Email Infrastructure for AI Agents

AgentMail charges $200/mo for 150 inboxes. We needed 500+. So we built a self-hosted alternative with Postfix, FastAPI, and Supabase — running on a $7/mo VPS.

When we were building AI agents that needed to send and receive emails, AgentMail was the obvious first choice. Clean API, decent documentation. Then we hit the pricing page.

25 inboxes: $20/mo. 150 inboxes: $200/mo. 500+ inboxes: call us.

We needed hundreds of inboxes — different addresses for different agents, different domains for different clients. The per-inbox model didn’t scale.

What we built instead

Emails4Agents is four Docker containers:

  • Postfix — handles inbound SMTP on port 25, routes to LMTP
  • FastAPI — REST API layer, LMTP ingest server, webhook dispatch
  • Supabase — Postgres database, authentication, Realtime for events
  • Redis + Celery — async task queue for outbound sending and webhooks

Outbound mail goes through AWS SES at $0.10/1,000 emails. The whole stack runs on a $7/mo Hetzner VPS.

Feature comparison

AgentMailEmails4Agents
25 inboxes$20/mo~$7/mo (hosting)
150 inboxes$200/moSame $7/mo
500+ inboxesEnterpriseSame $7/mo
Data ownershipTheir serversYour servers
Custom domainsPlan-limitedUnlimited
AI classificationTheir modelsYour OpenRouter key
MCP serverNoYes (built-in)
Webhook eventsBasic7 event types
Open sourceNoYes

The tradeoff

AgentMail is easier to get started — no server to manage, no DNS to configure. If you need 10-20 inboxes and don’t want to run infrastructure, their starter plan is fine.

Emails4Agents is the right choice when:

  • You need more than ~50 inboxes
  • You want your email data on your own servers
  • You’re building multi-tenant apps where per-inbox pricing kills unit economics
  • You want to bring your own AI model for classification

Getting started

git clone https://github.com/finedesignz/emails4agents
cp .env.example .env
# Edit .env with your Supabase URL/keys, SES credentials
docker compose up -d

Full setup takes about 45 minutes including DNS configuration. See the API docs for the complete endpoint reference.

Tags:

#agentmail #self-hosted #ai-agents #email-infrastructure

Found this helpful?

Share it with someone who needs to read this.

finedesignz

Founder

AI agent infrastructure Email deliverability FastAPI / Python
View full profile →

Ready to Get Started?

Contact us today — we're here to help.

Ready to get started?

Start your free trial today. No credit card required.