Skip to content

Mail-in-a-Box

Turnkey self-hosted mail server with webmail, contacts and calendar for individuals

Public domain · CC0-1.0
  • Self-hosted

Listed by , founder & editor

57

Health

Active

Overview

Stars

15,481

Last commit

15 days ago

Nov 2026

Repository age

13 years

since Aug 2013

Latest version

v77

Sep 2026

Contributors

–

7 active in 90 days

Releases

4

last 12 months

Language

Python

Mail-in-a-Box turns a fresh Ubuntu 22.04 LTS 64-bit machine into a working mail server. It installs and configures Postfix for SMTP, Dovecot for IMAP, Roundcube for webmail, and Nextcloud for CardDAV and CalDAV contacts and calendars. Exchange ActiveSync is available through z-push.

It also handles the parts that make self-hosted mail hard. It runs its own DNS with SPF, DKIM, DMARC, DNSSEC, DANE TLSA and MTA-STS records set for you. TLS certificates come from Let's Encrypt. Spam filtering, greylisting, backups, a firewall, fail2ban and daily health checks are included. A control panel and API manage users, aliases, custom DNS records and backups.

The design is deliberate: there are no user-configurable setup options, and it is not meant for power-user customization. It is written in Python, dedicated to the public domain under CC0, and has been developed since 2013. It is a self-hosted alternative to Gmail, Outlook, Yahoo! Mail and Yandex Mail.

Who it's for

Individuals who want to own their email

One script sets up mail, webmail, contacts and calendar on a single server without hand-configuring each component.

Skip if: You do not want to run a server and manage a domain's DNS.

Small groups sharing one domain

The control panel lets you add mail users and aliases and set custom DNS records.

Skip if: You need admin delegation or multiple servers.

Privacy-minded users leaving Gmail or Outlook

Mail stays on hardware you choose, with encrypted transport and automated DNS security records.

Skip if: You need end-to-end encryption or a native mobile app.

The problem it solves

Running your own mail server means wiring together SMTP, IMAP, spam filtering, DNS records and TLS by hand. Mistakes cause lost or rejected mail. This project automates that setup so you can leave a hosted provider.

Strengths

  • Installs SMTP, IMAP, webmail, contacts and calendar from one setup script
  • Sets SPF, DKIM, DMARC, DNSSEC, DANE and MTA-STS records automatically
  • Free Let's Encrypt TLS certificates are provisioned for all services
  • Control panel and API manage users, aliases, DNS and backups
  • Daily health checks cover services, ports, certificates and DNS

Trade-offs

  • Needs a fresh Ubuntu 22.04 LTS 64-bit machine, nothing else on it
  • No user-configurable setup options by design
  • Other mail providers may still spam-filter or block your outgoing mail
  • SMTPUTF8 is not supported

Mail-in-a-Box replaces

Self-host Mail-in-a-Box

Self-hostable
Yes

In the community

Frequently asked questions

Is Mail-in-a-Box free?

Yes. It is released under CC0, which places it in the public domain. You pay only for your own server and domain.

Which operating system does it need?

A fresh 64-bit Ubuntu 22.04 LTS machine. The setup script installs and configures everything on it.

Does it include webmail and calendar?

Yes. Roundcube provides webmail, and Nextcloud provides CardDAV and CalDAV for contacts and calendars.

Can I host a website on it?

Yes, it can serve static websites over HTTPS. You can also point a domain elsewhere with a custom DNS A record.

Other Yahoo! Mail alternatives

Compare all 5 Yahoo! Mail alternatives →

Similar tools in Email software

Haraka

Email software

Plugin-based SMTP server in Node.js for filtering, relaying and sending mail at volume

5.6k 720 today Thriving MIT

forsaken-mail

Email software

Self-hosted disposable email inbox with instant mailboxes and no sign-up

1.5k 511 28 days ago Slowing GPL-2.0

Mailcow

Email software

Docker-based mail server suite with SOGo webmail for admins who run their own domain

14k 1.9k 4 days ago Thriving GPL-3.0

Replaces Yahoo! MailYandex MailGmail +1

docker-mailserver

Email software

Containerized mail server built on Postfix and Dovecot, configured with plain files

20k 2.1k today Thriving MIT

Replaces Gmail

FairEmail

Email software

Android email client for people who want privacy and many accounts in one inbox

4.8k 714 3 days ago Active GPL-3.0

Replaces Microsoft Outlook