Give an agent a real email address — on a box you own.

An agent-native, self-hosted mail server in Rust. Receive, parse, thread, search and send real SMTP mail behind a REST API and an MCP server. Agents and humans are both first-class users.

Apache-2.0 Rust Self-hosted v0.1 — in development

The gap

The hard part of an agent mailbox was never the API. It is the plumbing: receiving over SMTP, sending with real deliverability, parsing genuinely broken MIME, threading, storage.

Hosted agent-mail products solve that well — closed, on someone else's infrastructure. Self-hostable mail servers solve it too — with no notion of an agent: no per-agent inbox provisioning, no threads as API resources, no MCP.

OpenMail is the intersection nobody occupies: agent-native, self-hostable, permissively licensed.

What agent-native means

Inboxes are API resources

Provisioned in one call. Not Unix accounts, not aliases, not a mailbox someone creates by hand.

Threads, not folders

Stitched from In-Reply-To and References. An agent asks for a conversation.

Quoted history stripped

extracted_text is the new content only. An agent reading full bodies re-reads the whole thread every turn.

MCP, natively

An agent owns and operates its mailbox as tools. Credential routes can never become tools.

Push, not poll

Webhooks and a WebSocket stream for message.received.

Humans too

Standard IMAP/SMTP is a goal, not an afterthought. Point Apple Mail at the mailbox an agent is driving.

Built on crates that did not exist

Two implementations of mail plumbing exist under a permissive licence: Mox (MIT, Go), and Stalwart's primitives (Apache-2.0, Rust). Stalwart's server is AGPL — which is why no permissively licensed Rust mail server exists.

Building one means writing what the ecosystem is missing. These ship standalone so any Rust mail project can use them.

CrateWhatPrior art
mail-daneDANE / TLSA for SMTP (RFC 7672)first in Rust
mail-mta-stsMTA-STS policy discovery and cache (RFC 8461)first in Rust
mail-dsnDelivery Status Notifications (RFC 3464)first in Rust

Sending: rent reputation, or build your own

# relay — someone else's IP reputation, inbox placement on day one
provider = "ses"        # or oracle, sendgrid, postmark, resend, custom
region   = "us-east-1"

# or direct-to-MX — your reputation, MTA-STS and DANE enforced
mode = "direct"

Receiving is always yours.

Oracle Cloud blocks outbound TCP/25 for tenancies created after June 2021 — inbound is unaffected. There you receive directly and relay outbound on 587. Direct-to-MX is not possible on that host at all.

Self-hosted first

OpenMail is a server you run. Not a trial of a hosted product, not an open-core teaser with the useful half behind a licence key.

Apache-2.0 means you can run it, fork it, and build a commercial product on top — including one that competes with anything we might host later. That is the intent, not an oversight.

git clone https://github.com/karti-ai/openmail
cd openmail && docker compose up