Best self-hosted email server: Stalwart, mailcow, Mailu and Mail-in-a-Box compared

Four free self-hosted email servers compared on licence, components and requirements, with each claim sourced to the product's own site or licence file.

By Shuki Vaknin 5 min read

If you want to run your own mail server, four free options come up often: Stalwart, mailcow, Mailu and Mail-in-a-Box. They solve the same problem with different amounts of moving parts. Stalwart is one server that speaks the mail protocols itself. mailcow and Mailu are sets of Docker containers. Mail-in-a-Box is an installer that turns one Ubuntu server into a mail server with a control panel.

We run Stalwart in Jabali Panel, so read this as a comparison by an interested party. Each product fact below comes from that product’s own homepage, documentation or licence file, as cited in brackets. Where we make a judgement, we say so. For the wider choice of control panels, see the open-source panel roundup.

The short answer

  • Stalwart if you want one service for mail, calendars and contacts, and you can work with a newer project’s upgrade notes.
  • mailcow if you already run Docker Compose and want each mail component in its own container, with a web interface over the stack.
  • Mailu if you want a Docker-based mail server with a web administration interface, set up with Docker Compose or Kubernetes [6].
  • Mail-in-a-Box if you want one Ubuntu server, a control panel for accounts and DNS, and as few settings as possible.

Licences

  • Stalwart is dual-licensed under the GNU Affero General Public License v3.0 and the Stalwart Enterprise License v2. Its README says “About 85% of Stalwart’s features are free and open source under the AGPL-3.0”, and the rest make up the Enterprise edition [1].
  • mailcow: dockerized is licensed under GPL version 3 [5].
  • Mailu is MIT-licensed [7], and its homepage describes its components as “all FOSS components” [6].
  • Mail-in-a-Box is dedicated to the public domain under CC0 1.0 [8, 9].

If a feature matters to you, check whether it sits in the free part of the product before you rely on it. For Stalwart, the feature list is the place to check [1].

What each one runs

Stalwart’s homepage lists the protocols it supports: JMAP, IMAP, POP3, SMTP, CalDAV, CardDAV and WebDAV. It also says “What used to take five servers, now takes one” [2]. That is the vendor’s own description of the design.

mailcow runs each part as its own container. Its documentation lists Postfix as the mail transfer agent, Dovecot for IMAP and POP, SOGo for webmail, calendar and contacts, Rspamd for spam, and ClamAV as an optional antivirus scanner [3].

Mailu is “a set of Docker images”. Its homepage lists standard IMAP, SMTP and submission, webmail and an administration interface, aliases, auto-reply and forwarding, DANE, MTA-STS, Let’s Encrypt, DKIM, greylisting, DMARC and SPF checks, and an antivirus scanner [6].

Mail-in-a-Box provides webmail (Roundcube), an IMAP and SMTP server, contacts and calendar synchronisation with Nextcloud Contacts, spam filtering and greylisting, and a control panel for accounts, aliases and custom DNS records. When it is your nameserver, it sets SPF, DKIM, DMARC and MTA-STS records, and it can enable DNSSEC [8].

Requirements

  • mailcow needs Docker 24.0.0 or later and Docker Compose 2.0 or later. Its install page also lists system packages such as git, openssl, curl and jq [4].
  • Mail-in-a-Box must run on a fresh Ubuntu 22.04 x64 machine. Its homepage says that “containers and modified images are not supported” [8].
  • Mailu is installed with Docker Compose or Kubernetes [6].

Where Jabali Panel fits

Jabali Panel runs Stalwart 0.16.24 as its mail server, with Bulwark 1.12.0 as the webmail client [10]. The panel does four things with that stack:

  • It manages DKIM, SPF, DMARC and MTA-STS for each domain [11].
  • It manages mailboxes, forwarders and autoresponders [12].
  • Its Mail Deliverability page shows the DKIM, SPF and DMARC state for each domain, with a score from 0 to 100 [13].
  • It installs on a fresh Debian 13 or Ubuntu 24.04 server [14].

Jabali Panel does not run mailcow, Mailu or Mail-in-a-Box. If you use one of those, run it on its own server and point the mail records at that server.

Stalwart’s version and upgrade path matter here. Jabali Panel pins Stalwart 0.16.24 [10]. Read the Stalwart changelog before you change any version, and see Stalwart vs mailcow for the 1.0 upgrade note.

Which one fits which job

  • One server for mail, calendars and contacts, with the DNS and SSL handled by a panel: Stalwart in Jabali Panel. See Self-hosted mail server with Stalwart and Jabali Panel.
  • A team that runs Docker Compose and wants each component visible: mailcow or Mailu.
  • One Ubuntu server, a small number of domains, and few settings to manage: Mail-in-a-Box. Its maintainers say that “there are basically no configuration options and you can’t tweak the machine’s configuration files after installation” [8].
  • A need for a commercial licence or support: check the paid options on each product’s own site before you decide.

Common questions

Can I run more than one of these?

Yes, on separate servers. Point the MX record at one server at a time.

Is Mail-in-a-Box still maintained?

Its homepage lists version v76, dated May 24, 2026, and says that its maintainers “work on Mail-in-a-Box in their limited free time” [8].

Which one is best?

That depends on your team, your server and the jobs you need done. This comparison lists what each product says it does and what it needs. It does not rank them.

Sources and check dates

All product sources were fetched on 2026-10-30. Jabali sources are pages in the Jabali Panel docs.

  1. Stalwart README, licence split and feature share: https://raw.githubusercontent.com/stalwartlabs/stalwart/main/README.md
  2. Stalwart homepage, protocols and “five servers, now takes one”: https://stalw.art/
  3. mailcow documentation, component list: https://docs.mailcow.email/
  4. mailcow installation page, prerequisites: https://docs.mailcow.email/getstarted/install/
  5. mailcow: dockerized licence, GPL-3.0: https://raw.githubusercontent.com/mailcow/mailcow-dockerized/master/LICENSE
  6. Mailu homepage, features and setup: https://mailu.io/
  7. Mailu licence, MIT: https://raw.githubusercontent.com/Mailu/Mailu/master/LICENSE.md
  8. Mail-in-a-Box homepage, requirements and status: https://mailinabox.email/
  9. Mail-in-a-Box licence, CC0 1.0: https://raw.githubusercontent.com/mail-in-a-box/mailinabox/master/LICENSE
  10. Jabali Panel component inventory: https://jabali-panel.com/docs/platform/components/
  11. Jabali Panel docs home, mail features: https://jabali-panel.com/docs/
  12. Jabali Panel mailboxes, forwarders and autoresponders: https://jabali-panel.com/docs/user/mailboxes/, https://jabali-panel.com/docs/user/forwarders/, https://jabali-panel.com/docs/user/autoresponders/
  13. Jabali Panel Mail Deliverability: https://jabali-panel.com/docs/admin/mail-deliverability/
  14. Jabali Panel installation: https://jabali-panel.com/docs/installation/