What is Mailcow?
Mailcow is a Docker-based mail server suite that bundles Postfix, Dovecot, SOGo webmail, rspamd, ClamAV, and more into a single easy-to-deploy package. It provides a polished web UI for managing domains, mailboxes, and aliases.
Requirements
- A server with at least 4 GB RAM
- Docker and Docker Compose installed
- A domain with proper DNS records (A, MX, PTR)
- Ports 25, 80, 443, 143, 993, 110, 995, 587, 465 available
Installation
cd /opt
git clone https://github.com/mailcow/mailcow-dockerized
cd mailcow-dockerized
./generate_config.shWhen prompted, enter your mail server's hostname (e.g., mail.example.com).
docker compose pull
docker compose up -dInitial Configuration
- Access the admin UI at
https://mail.example.com - Default login: admin / moohoo (change immediately)
- Add your domain under Configuration → Mail Setup → Domains
- Create mailboxes under Mailboxes
- Let's Encrypt SSL is configured automatically
DNS Records Needed
- A record:
mail.example.com → YOUR_IP - MX record:
example.com → mail.example.com(priority 10) - SPF:
v=spf1 mx ~all - DKIM: Copy from Mailcow admin panel
- DMARC:
v=DMARC1; p=quarantine; rua=mailto:postmaster@example.com - PTR: Reverse DNS for your server IP