My agents keep needing to read email. Signup codes, verification links, password resets: every automated workflow that touches a third-party service eventually hits an inbox. There are hosted APIs for this, and they work fine until you think about what's actually in those emails. In a signup flow, the message with the verification code is the account credential. Every one of them passes through someone else's servers.
So I built openagent.email: a self-hosted mail server where every agent gets its own mailbox on a domain you own. It runs as two containers, a catch-all Postfix/Dovecot mailbox (docker-mailserver) and a small Node/Hono API, with an MCP server on top so any MCP client (Claude Code, Cursor, Windsurf...) can use it. The whole stack idles at about 190 MB of RAM on my production instance, and it has 268 automated tests.
This post is about the design decisions that make it work, because most of them are not the obvious ones.
One real mailbox, unlimited logical identities
The naive design is one mailbox per agent. Provisioning mailboxes in Dovecot per agent is slow, stateful, and pointless. Agents don't need IMAP folders; they need an address and a way to read what lands on it.






