AI agents need to send and receive email, but the options right now are all SaaS mail APIs. Someone else’s domain, shared infrastructure, and you’re hoping they don’t change their pricing or shut down the feature you depend on. You don’t really own anything.
So I built Open Mailserver, an open-source mail server you can throw on a VPS and actually own. Your agents get real inboxes on your domain, and you control the full lifecycle: provisioning, sending, receiving, DNS, all of it.
What gets interesting
Once your agents have their own mail, some cool things open up. A sales agent can send outbound from [email protected], read replies, and follow up on its own. A support agent gets its own inbox and triages incoming tickets without you wiring up a third-party integration. You can spin up disposable inboxes for testing or signups and tear them down when you’re done.
It’s useful for personal stuff too. Think bill and receipt monitoring, where an agent just files everything as it comes in. RSVPs are another one I keep coming back to, having something that replies to event invites and keeps my calendar updated without me touching it. You could even give your home automation setup its own inbox so it emails you alerts instead of relying on whatever app notifications you’ll probably ignore anyway.
Really what this comes down to is agents communicating over email the same way people do. Not through some abstraction layer or webhook, but actual email on a domain you control.
How it’s put together
The idea was to keep the mailbox management separate from the actual mail delivery. One part handles the operational stuff (creating mailboxes, managing aliases, issuing API keys) through an API and CLI. The other part, powered by mox, handles SMTP, IMAP, and direct-to-MX sending. Postgres stores the control plane state, and Docker Compose ties it all together as three services.
In practice, you spin up the stack, create a mailbox through the API or CLI, and your agent can start sending from your domain and reading replies back over HTTP right away.
Try it out
Install guide and docs are at openmailserver.com, source is on GitHub. MIT licensed. Curious what people end up using it for.