A single-file, self-hosted private email server with SMTP, POP3 and IMAP support plus a web mail management interface for your own domain.
mailez-hq/mailez
Self-hosted mail server for your own domain, with SMTP/IMAP/POP3, CardDAV/CalDAV, a React webmail and admin console, deployed via Docker Compose.
Open-source alternative to:Gmail
Microsoft Outlook
- Stars
- 286
- Forks
- 22
- Open issues
- 1
- Last commit
- 6 days ago
What is it?
mailez is a self-hosted mail system for running email on your own domain, from a personal mailbox to organizations with thousands of users. It covers mail delivery, spam filtering, authentication, an admin console and a webmail client, and is deployed with a single Docker Compose command.
The server speaks SMTP, IMAP, POP3 and ManageSieve, with CardDAV and CalDAV for contacts and calendars on phones and desktops. Its webmail includes a three-pane inbox, conversation threads, a Sieve filter editor, PGP sign and encrypt, two-factor authentication, and a Drive for files. Calendar subscriptions can be added to Apple Calendar or Google Calendar, and a Delta Chat login QR is available in settings.
The admin console manages domains, mailboxes, aliases and relays, and includes one-click DKIM key generation and a health page that checks MX, SPF, DMARC, DKIM, blocklists, MTA-STS and certificate expiry. The stack uses Go for the backend, Next.js for the frontend and a Go mail engine called mailezine, with SQLite by default and optional MySQL or PostgreSQL.
Key features
- 01Full mail stack with SMTP, IMAP, POP3 and ManageSieve support
- 02CardDAV and CalDAV sync for contacts and calendars
- 03React webmail with conversation view, search operators and keyboard shortcuts
- 04Admin console for domains, mailboxes, aliases, DKIM and domain health checks
- 05One-command deployment with Docker Compose
Use cases
- Running company email on your own domain with data kept in-house
- Hosting a private mailbox instead of renting one from a mail provider
- Public-sector or regulated organizations with data-sovereignty requirements
- Setting up a self-hosted mail server without deep Linux mail expertise
Quick start
- 1
Clone mailez and mailezine side by side
git clone …/mailez && git clone …/mailezine - 2
Pre-create data directory on Linux hosts
mkdir -p deploy/data && sudo chown -R 1000:82 deploy/data - 3
Start the dev tier
./deploy/mailezctl.sh up - 4
Provision the admin account inside the backend container
docker compose --env-file deploy/mailez.env -f deploy/docker-compose.ce.yml exec backend mailez-seed
Things to know
- Needs a sibling mailezine checkout and Docker to build and run.
- Requires a mail server setup with DNS, ports 25/465/587 and TLS certificates for production use.
- Licensed AGPL-3.0, so modified network-served versions must be open-sourced unless you buy a commercial license.
Topics
FAQ
- What is mailez?
- Self-hosted mail server for your own domain, with SMTP/IMAP/POP3, CardDAV/CalDAV, a React webmail and admin console, deployed via Docker Compose. mailez is a self-hosted mail system for running email on your own domain, from a personal mailbox to organizations with thousands of users. It covers mail delivery, spam filtering, authentication, an admin console and a webmail client, and is deployed with a single Docker Compose command.
- Is mailez free to use? What license does it have?
- mailez is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is mailez still maintained?
- Actively maintained. The last commit to mailez was on Oct 14, 2026.
- What can I use mailez for?
- Running company email on your own domain with data kept in-house Hosting a private mailbox instead of renting one from a mail provider Public-sector or regulated organizations with data-sovereignty requirements Setting up a self-hosted mail server without deep Linux mail expertise
- How do I install mailez?
- Clone mailez and mailezine side by side: git clone …/mailez && git clone …/mailezine Pre-create data directory on Linux hosts: mkdir -p deploy/data && sudo chown -R 1000:82 deploy/data Start the dev tier: ./deploy/mailezctl.sh up Provision the admin account inside the backend container: docker compose --env-file deploy/mailez.env -f deploy/docker-compose.ce.yml exec backend mailez-seed
- Where can I get mailez?
- The source code and installation instructions are on GitHub: https://github.com/mailez-hq/mailez
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A self-hostable email service built on Cloudflare Workers, letting you create multiple mailboxes under one domain with sending, attachments and a responsive web UI.
Scans your inbox to map which accounts and services hold your data, then helps you unsubscribe and request deletion. Local-first desktop app.
Self-hosted newsletter and mailing list manager shipped as a single Go binary, backed by PostgreSQL.
Open source AI email assistant and email client for Gmail and Outlook that organizes your inbox and pre-drafts replies.
Self-hosted, open-source customer engagement platform for sending broadcasts and automated journeys across email, SMS, push, WhatsApp and Slack.