mailcow

Dockerized full-stack mail server suite

Mail Servers ★ 13.5k stars Medium setup GPL-3.0

mailcow is a complete, Docker-based mail server solution that bundles Postfix, Dovecot, Rspamd, SOGo, and a modern web UI. It makes running a full-featured mail server with antispam and webmail straightforward.

mailcow setup guides & articles

Hands-on coverage of mailcow from the blog.

Key features

  • Complete Docker mail stack
  • Rspamd antispam built in
  • SOGo webmail and ActiveSync
  • Modern management UI with API

Pros & cons

Strengths

  • All components preconfigured
  • Active community

Trade-offs

  • Substantial RAM requirements
  • Many containers to manage

mailcow replaces

Last reviewed Aug 26, 2026 · 830 words

mailcow wants 6 GB of RAM and a public IP address that has never sent spam, and the second requirement is harder to buy than the first. RAM is a line item on a VPS order; a clean IP with a reverse DNS record you control is something you verify before paying, because no amount of configuration fixes an address that Microsoft's filters already distrust. Get those two right and mailcow is the most complete self-hosted mail stack there is. Get them wrong and you will spend months explaining bounced mail.

What the 6 GB buys you

mailcow is not a mail server so much as around 20 containers that together are one: Postfix for SMTP, Dovecot for IMAP, Rspamd for spam filtering, ClamAV for attachments, SOGo for webmail, calendars and ActiveSync, plus MariaDB, Redis, nginx, an ACME client, a watchdog, and the management UI with its API. Everything is wired and tuned by the project, which is the entire value proposition. You could assemble the same stack by hand, and Docker Mailserver does roughly that with fewer moving parts, but you would then own every integration decision.

The catalogue's "many containers to manage" is accurate and less scary than it sounds. You manage them as one unit with docker compose and the project's own update.sh; you are not expected to understand each one. ClamAV alone accounts for about 1 GB of that memory, and SKIP_CLAMD=y in mailcow.conf drops it for a personal server where attachment scanning is not worth the cost. With it skipped, a 4 GB VPS runs mailcow for a handful of users, though the project's own recommendation stays at 6.

Check the IP and the ports before you install anything

Three things, in order. Confirm the provider lets you set the PTR record for your IP and that it resolves to your mail hostname (mail.example.com). Confirm outbound port 25 is open; many VPS providers block it on new accounts until you ask, and residential ISPs block it permanently, which is why mailcow at home means relaying through a provider anyway. Then check the IP against the major blocklists. If any of the three fails, pick a different server, not a different mail suite.

Inbound you will open 25, 465 and 587 for SMTP, 143 and 993 for IMAP, 110 and 995 for POP3 if anyone still uses it, 4190 for Sieve, and 80 plus 443 for the web UI and certificates. mailcow expects to own 80 and 443 on that host; running it behind an existing reverse proxy is supported but is an extra day of work, so a dedicated VPS is the sane default.

Install is four commands, DNS is the actual work

git clone https://github.com/mailcow/mailcow-dockerized /opt/mailcow-dockerized
cd /opt/mailcow-dockerized
./generate_config.sh
docker compose pull && docker compose up -d

generate_config.sh asks for the hostname and timezone and writes mailcow.conf. Log in at https://mail.example.com as admin with the default password moohoo, change it immediately, add a domain, and open that domain's DNS tab: mailcow shows the exact MX, SPF, DKIM, DMARC and autodiscover records it wants, including the DKIM key it generated for you. Copy them into your DNS provider. That page is the best part of mailcow and the part that turns a normally error-prone process into transcription.

Updates, backups and the honest question

./update.sh pulls new images and applies migrations; run it monthly and read the changelog first, because mailcow moves quickly. Backups are helper-scripts/backup_and_restore.sh backup all, which dumps the database and the mail volumes to a directory you then ship off the box. Mail is the one service where a missed backup can lose other people's messages, so treat that script as non-negotiable.

Whether to do any of this is a separate question, and I have written the honest version at length. Short form: for a personal domain on a clean VPS with a monthly hour of attention, mailcow works and deliverability is fine. For a business that cannot tolerate a missed invoice, the effort is better spent on a paid provider with your own domain. Mailu is the lighter option in the email category if 6 GB is out of reach; it trades SOGo and some polish for a considerably smaller footprint.

What I'd do

A 4 to 8 GB VPS from a provider that hands you the PTR record, port 25 confirmed open before the first payment clears, SKIP_CLAMD=y for a family server, DNS records copied verbatim from mailcow's own page, nightly backups to a second location, and update.sh on a calendar. Run like that, it is a genuinely good mail server. Skip any one of those steps and it becomes a project that teaches you why people pay for email.

Compare mailcow

16 head-to-head comparisons.

Similar mail servers apps