🔥
HotRepo
Self-host SaaS catalog
mailinabox — Self-host Mail-in-a-Box helps individuals take back control of their email by defining a o
📦
mail-in-a-box

mailinabox — Self-host Mail-in-a-Box helps individuals take back control of their email by defining a o

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.

15.3k🍴 1.5kPython📜 cc0-1.0#email#mail#server#smtp

mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.

15,280 stars on GitHub · 🍴 1,530 forks · 📜 License: cc0-1.0 · 💻 Language: Python

What is mailinabox?

Self-hosting email is usually a maintenance trap, but Mail-in-a-Box takes the appliance approach: start with a fresh Ubuntu 22.04 server and let it configure the full mail stack for you. Its differentiator is opinionated simplicity — no endless tuning, no “choose your MTA adventure,” just a working private mail server with sane defaults.

Main components

  • SMTP and IMAP via Postfix and Dovecot for sending and receiving mail.
  • Webmail through Roundcube, with mail filtering and client autoconfig.
  • Contacts and calendar sync using Nextcloud CardDAV/CalDAV, plus Exchange ActiveSync via z-push.
  • Built-in DNS with SPF, DKIM, DMARC, DNSSEC, DANE TLSA, MTA-STS, and SSHFP records configured automatically.
  • Let’s Encrypt TLS certificates for HTTPS and mail services.
  • SpamAssassin and postgrey for spam filtering and greylisting.
  • Backups with duplicity, firewalling with ufw, intrusion protection with fail2ban, and basic monitoring with munin.
  • Web control panel and API for managing users, aliases, DNS records, backups, and system status.

Clear use cases

  • Run email for a personal domain without relying on Google Workspace, Microsoft 365, or Fastmail.
  • Give a family, small team, or community group private mailboxes under their own domain.
  • Host mail, DNS, contacts, calendars, and simple static websites from one VPS.
  • Standardize a small organization’s email setup without hand-assembling Postfix, Dovecot, DKIM, DMARC, and TLS.
  • Learn how a modern mail stack fits together while still using a production-ready configuration.
  • Keep control of mail storage, backups, aliases, and DNS policy instead of spreading them across multiple hosted services.

The biggest strength is operational completeness — Mail-in-a-Box does not just install an SMTP server and leave the hard parts to you. It handles DNS records, TLS, spam controls, monitoring, backups, webmail, sync services, and a control panel as one integrated system. Compared with commercial email hosting, the unique value is not cheaper mailboxes; it is sovereignty over your domain, data, configuration, and recovery path.

The trade-off is that Mail-in-a-Box is intentionally not a power-user framework. If you want to customize every service, swap components, or run it on a heavily modified server, you are fighting the design. It works best when you accept its defaults, dedicate a clean VPS to it, and understand that email deliverability still depends on IP reputation, reverse DNS, and the policies of large mail providers.

Best for technically comfortable individuals, privacy-minded domain owners, small organizations, and sysadmins who want a complete self-hosted email appliance rather than a custom mail-server build.

Topics: the project is tagged with popular topics:

  • 🏷️ email
  • 🏷️ mail
  • 🏷️ server
  • 🏷️ smtp
  • 🏷️ self-hosted

Quick install

See the README for detailed install instructions. Most projects support Docker — if the repo has a Dockerfile, use:

git clone https://github.com/mail-in-a-box/mailinabox.git
cd mailinabox
docker build -t mailinabox .
docker run -d -p 8080:8080 mailinabox

Minimum system requirements

Component Recommended
RAM 1024 MB
CPU 1 vCPU
Disk 15 GB SSD
OS Ubuntu 22.04 LTS / Debian 12
Docker 24.0+

⚡ Deploy fast on VSIS

Use the VSIS VPS Mini 1GB RAM / 1 vCPU / 15GB SSD (~70k/tháng) plan from VSIS.NET — high-speed VN-based VPS, 24/7 support, ideal for running mailinabox smoothly.

🎯 Benefits:

  • One-command docker compose up -d deploy in 2 minutes
  • Dedicated IPv4, root access, unmetered domestic bandwidth
  • Daily snapshot backup
  • Free install assistance from the VSIS team

👉 See matching VPS plans at vsis.net

Resources


Article compiled from GitHub data on 05/05/2026. Star/fork counts may have changed — see live numbers via the GitHub link.