Open Mailserver is a control plane over a self-hosted mail runtime. It keeps
mailbox provisioning and operator workflows in the application layer while mox
owns SMTP, IMAP, and direct-to-MX delivery.
- FastAPI app for HTTP endpoints
- Typer CLI for agent workflows
- Postgres for domains, mailboxes, aliases, API keys, outbound mail, and debug metadata
- Local Maildir copies for smoke tests and fallback reads
moxas the containerized SMTP/IMAP runtime
The default deployment is the checked-in compose.yaml, which runs:
apipostgresmox
The app keeps the user-facing API stable while Docker Compose manages the API, database, and mail runtime as one deployable stack.
Open Mailserver owns:
- mailbox records
- aliases
- mailbox-scoped API keys
- outbound metadata and delivery history
- operational checks, backups, and install flow
mox owns:
- SMTP listeners
- IMAP access
- mailbox login state
- direct-to-MX sending and receiving
At a high level:
- The API or CLI creates mailbox and alias records in the control plane.
- Open Mailserver syncs the relevant changes into
mox. moxbecomes the authoritative live mail runtime for sending and receiving.- The API continues to provide agent-friendly mailbox, message, and operational access.
Maildir is not the primary live runtime. It remains for local copies, smoke-test artifacts, and safe fallback reads in the app layer.