mailcow: dockerized (🐮 + 🐋 = 💕) is a modern, Docker-native mail server suite that provides a complete email solution with groupware functionality. Built on top of Postfix, Dovecot, Rspamd, ClamAV, and SOGo, mailcow offers an easy-to-deploy, production-ready mail server with a web interface.
| Component | Technology |
|---|---|
| MTA | Postfix |
| IMAP/POP3 | Dovecot |
| Spam Filtering | Rspamd |
| Antivirus | ClamAV + Olefy |
| Web Server | Nginx |
| Database | MariaDB |
| Webmail/Groupware | SOGo |
| Caching | Redis, Memcached |
| DNS | Unbound (DNSSEC) |
| Deployment | Docker Compose |
| Method | Description | Best For |
|---|---|---|
| Docker Setup | Native Docker Compose deployment | Production, Docker environments |
| Ansible (Docker) | Automated Docker deployment with Ansible | Automated deployments, IaC |
| Ansible (Components) | Install components without Docker | Non-Docker environments |
| Manual Setup | Step-by-step manual installation | Learning, custom setups |
mailcow is Docker-native and uses Docker Compose for deployment.
# Clone the repository
git clone https://github.com/mailcow/mailcow-dockerized
cd mailcow-dockerized
# Generate configuration
./generate_config.sh
# Edit mailcow.conf
nano mailcow.conf
# Start mailcow
docker compose pull
docker compose up -d
mailcow uses a microservices architecture with isolated containers:
┌─────────────────────────────────────────────────────┐
│ mailcow Suite │
├─────────────────────────────────────────────────────┤
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Postfix │ │ Dovecot │ │ Rspamd │ │
│ │ (MTA) │ │ (IMAP) │ │ (Spam) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ ClamAV │ │ SOGo │ │ Nginx │ │
│ │ (AV) │ │(Webmail) │ │ (Web) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ MariaDB │ │ Redis │ │ ACME │ │
│ │ (DB) │ │ (Cache) │ │ (SSL) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────┘
Docker Compose
mailcow requires 12 persistent volumes:
| Volume | Purpose |
|---|---|
vmail-vol-1 |
Mail storage (compressed/encrypted) |
vmail-index-vol-1 |
Mail indices for full-text search |
mysql-vol-1 |
Database (users, domains, config) |
redis-vol-1 |
Redis data (sessions, cache) |
rspamd-vol-1 |
Rspamd data (learned spam, configs) |
clamd-db-vol-1 |
ClamAV virus database |
postfix-vol-1 |
Postfix queue and data |
postfix-tlspol-vol-1 |
TLS policy database |
crypt-vol-1 |
⚠️ Encryption keys (backup required!) |
sogo-web-vol-1 |
SOGo web files |
sogo-userdata-backup-vol-1 |
SOGo user data backups |
mysql-socket-vol-1 |
Database socket |
A public demo instance is available for testing:
adminmoohooNote: Demo is reset periodically. Do not use for production testing.
Common issues and solutions:
👉 See mailcow Configuration for detailed configuration guidance.
Any questions?
Feel free to contact us. Find all contact information on our contact page.