Release v1.0.0, 4 December 2026AGPL-3.0A young project
Your own mail server
in one Go program
With mailboxes AI agents can use. OwnMail is a free, open source mail server you host yourself: it receives, filters, stores and sends mail for your own domains, and syncs calendars and contacts. Made by OwnLabs.

Mailboxes AI agents can use
OwnMail speaks the Model Context Protocol, so AI programs like Claude Code, Cursor, claude.ai or ChatGPT can work with mail directly, with the same rights and sending limits as the person.
- https://<mail server>/mcp
- For each mailbox. An agent can list folders, search and read messages and attachments, flag, move and delete them, save drafts, set the out of office reply, and send, reply and forward. You choose what it may do: read, organise, send within your organisation, or send to anyone. It only sees the tools for its rights.
- https://<mail server>/api/mcp
- For administrators. Manage domains, DNS records, mailboxes, forwarding, settings and backups with an access token that can be limited to reading. It never reads mail.
- You Find last week's invoice from our hoster and move it to Invoices.
- Toolsearch_messages from billing@example.com, since last Monday, has attachment
- Toolmove_messages 1 message to Invoices
- Agent Done. “Invoice November” is now in Invoices.
claude mcp add --transport http mail \
https://mail.example.com/mcp \
--header "Authorization: Bearer <app password>"Details: AI programs for mailboxes and MCP for the administration.
A whole mail server in one process
- One program instead of a stack
- No Postfix, Dovecot, Rspamd and glue to keep in sync. SMTP, IMAP, filters, spam checks, signing, calendars and contacts run in a single process. The release binary is about 33 MB; on a small test setup (3 domains, 7 mailboxes) it used around 175 MB of memory.
- DNS you can get right
- Every domain lists each record it needs, checked live (in place, missing or different), with copy buttons. Copy all of them at once as a zone file or as step by step instructions for an AI assistant. OwnMail never changes your DNS itself.
- Safe to run
- Two factor sign in for administrators and mailboxes, administrators for single domains, encrypted incremental backups with restoring of single mailboxes, and updates on a click that go back to the old version if the new one does not start.
- Groupware included
- Calendars and contacts (CalDAV and CardDAV) that sync to phones and computers, filters, out of office replies, shared mailboxes, rooms and equipment, forwarding and distribution groups.
- Easy for mail programs
- Thunderbird and Outlook find their settings from the address, Apple devices get a setup file, and each domain can have its own server name for mail programs.
- You see what happens
- The start page shows what stands between your server and good delivery, and how much mail came in, went out and was turned away.
One side for administrators, one for mailbox owners
All screenshots show example data.

What it does not do (yet)
- No webmail
No calendar or contacts in the browser either. Use any IMAP and CalDAV or CardDAV program: Thunderbird, Apple Mail and Calendar, Outlook over IMAP, or DAVx⁵ on Android.
- No Exchange or ActiveSync
Phones and Outlook connect over IMAP, CalDAV and CardDAV.
- No virus scanning
Attachments are not scanned for viruses. There are also no reports from receivers about your mail (DMARC reports) and no MTA-STS or DANE for outgoing mail.
Need one of these today? See how OwnMail compares with mailcow, Mailu, Stalwart and others.
Running in three steps
With Docker Compose and Caddy in front, as in the repository.
You need
- Port 25 open in both directions. Many cloud hosters block outgoing port 25 and unblock it only on request.
- Reverse DNS (PTR) of the server's address set to the mail server's name, at your hoster.
- A domain you control, to point the mail server's name and the mail records at the server.
- Docker with the Compose plugin, or systemd.
Before you start explains each of these and how to test them.
Check your server's IP address for blocklists and reverse DNS before you start.
- 1
Point your mail server name at the server and fetch the compose file
Create an A record for mail.example.com, then run:
Terminalmkdir ownmail && cd ownmail curl -fsSLO https://raw.githubusercontent.com/ownlabs-dev/ownmail/main/docker-compose.yml printf 'OWNMAIL_HOSTNAME=mail.example.com\nOWNMAIL_ACME_EMAIL=you@example.com\n' > .env - 2
Start it and read the one time setup code from the log
Terminaldocker compose up -d docker compose logs ownmail | grep setup_code - 3
Open the administration
Go to https://mail.example.com/admin, create the first administrator with the code, add your domain and enter the DNS records it shows.
- Other ways to run it: systemd, Coolify, or behind your own reverse proxy. All flags and paths: Reference.
Before you install
- How is OwnMail different from mailcow, Mailu or Stalwart?
Like Stalwart and Mox, OwnMail is one program instead of a stack of servers. Its mailboxes can be used by AI agents over MCP, which none of the six projects we compared has built in, and backups and updates are part of it. Others are further along elsewhere: mailcow and Stalwart have ActiveSync, mailcow has webmail and virus scanning, and most handle MTA-STS or DANE for outgoing mail.
- What does OwnMail cost?
Nothing. OwnMail is open source under the AGPL-3.0 license. There is no paid version and no hosted service; you run it on your own server.
- Does OwnMail change my DNS records?
No. It shows every record your domain needs and checks it live, but you enter the records at your DNS provider yourself.
- Can I read my mail in the browser?
Not yet. OwnMail has web pages for administrators and for mailbox owners, but no webmail. Use any IMAP program such as Thunderbird, Apple Mail or Outlook.
- Which servers does it run on?
Any server where port 25 is open in both directions and where you can set the reverse DNS. It runs with Docker Compose, as a systemd service or in Coolify.
- Is it ready for production?
OwnMail is a young project and changes quickly. Read the release notes before you update, and keep backups.
Run your own mail server
OwnMail v1.0.0 is a young project and changes quickly. Read the release notes before you update, and keep backups.