OpenSource-Hub
M

mailcow-dockerized

12.7k stars·System Optimization·SHA-256 checksum verified

A fully-featured, Docker-based email server suite with modern web interface, spam filtering, and easy deployment.

Smart Download

Visit Project Homepage

No installer available yet — head to the source repository

One-click email server deployment, as easy as raising a cow.

Core Features

  • Fully containerized with Docker, single command to run all services
  • Beautiful web admin panel for managing mailboxes, domains, aliases, and filters
  • Built-in Rspamd anti-spam engine + ClamAV antivirus for inbox protection
  • Auto Let's Encrypt TLS certificates, DKIM signing, SPF/DMARC support
  • SOGo groupware (calendar, contacts, webmail) included

What It Can't Do

  • You need a domain with correct DNS records (MX, A, TXT) for email delivery. 2. Use a clean server without other mail services to avoid port conflicts. 3. Default ports 80/443 must be open. 4. For production, consider purchasing a support contract for timely security patches. 5. Do not use SQLite in production; switch to MySQL/MariaDB (migration scripts provided).

Use Cases

  • Small/medium businesses running their own email server without third-party dependency
  • Tech enthusiasts self-hosting email for full data control and privacy
  • Small email service providers needing robust anti-spam/antivirus
  • Alternative to iRedMail, Poste.io, or other traditional mail solutions

Detailed Introduction

mailcow-dockerized is an open-source email server solution that bundles everything you need to run your own mail infrastructure using Docker containers. It includes Postfix (SMTP), Dovecot (IMAP/POP3), Rspamd (antispam), ClamAV (antivirus), SOGo (groupware), and a clean admin web UI. The project focuses on simplicity and reliability: a single docker-compose command sets up a complete email system with automatic TLS certificates, DKIM signing, and webmail access. It also features a responsive user dashboard for managing mailboxes, aliases, domains, and spam filters. With over 12k GitHub stars and active community support, mailcow is one of the most popular self-hosted email platforms, suitable for small businesses, organizations, and tech enthusiasts who want full control over their email data.

Troubleshooting & FAQ (2)

Troubleshooting
Why does SOGo container fail with 'Are you trying to mount a directory onto a file (or vice-versa)?' error?

This error occurs when /opt/mailcow-dockerized/data/conf/sogo/custom-fulllogo.png is a directory instead of a valid PNG file. Docker attempts to bind-mount the host path as a file inside the container, causing the failure. To fix, delete the directory and replace it with a proper PNG file, or remove it entirely if you don't need a custom full logo. After correcting the file, run docker compose up -d again.

GitHub Issue #7139
Troubleshooting
How to fix lazy_expunge not creating an EXPUNGED folder in mailcow Dovecot?

The lazy_expunge plugin is not loaded for the imap protocol because mailcow's Dovecot config uses a static mail_plugins_imap variable instead of including the top-level $mail_plugins. To work around this, edit data/conf/dovecot/extra.conf and add a protocol imap section that explicitly includes lazy_expunge using the $mail_plugins variable:

protocol imap {
  mail_plugins = $mail_plugins lazy_expunge
}

Then restart Dovecot: docker compose restart dovecot-mailcow.

This ensures the plugin is loaded for imap and the EXPUNGED folder will be created. Monitor the official issue #6558 for a permanent config fix.

GitHub Issue #6558

Tags

mail-serverdockerself-hostedemailanti-spampostfixdovecot

Getting Started

1

Download installer

Click the button above to download the installer for your system

2

Install the software

Double-click the downloaded installer and follow the prompts

3

Step 1: Ensure Docker and docker-compose are installed

4

Step 2: Clone the repo: git clone https://github.com/mailcow/mailcow-dockerized && cd mailcow-dockerized

5

Step 3: Generate configuration: ./generate_config.sh

Install Guide
  1. Step 1: Ensure Docker and docker-compose are installed
  2. Step 2: Clone the repo: git clone https://github.com/mailcow/mailcow-dockerized && cd mailcow-dockerized
  3. Step 3: Generate configuration: ./generate_config.sh
File Integrity

Checksum not available

This project has not published a SHA-256 checksum on its GitHub Release page

SHA256 Checksum

No checksum available

Download directly from GitHub Releases and verify file integrity yourself

All SHA-256 checksums on this platform are extracted from the project's official GitHub Release page, without any modification. You can independently verify them on the GitHub Releases page.

Open Source Transparency

View GitHub Source
Environment Guide

Uninstall Info

Navigate to the mailcow-dockerized directory, run docker-compose down -v to stop and remove containers and volumes. Then delete the directory. Warning: This permanently deletes all email data; back up first.

No Extra Dependencies

Ready to use after download. No additional runtime required.

Project Info
LicenseGNU General Public License v3.0
Last Updated2026-06-26 02:30:14
GitHub Repository

Having issues? Check the FAQ below

2 FAQs

Similar Projects