# Mailcow — Dockerized Email Server with Web Administration > A fully self-hosted mail server suite packaged as Docker containers. Bundles Postfix, Dovecot, SOGo groupware, ClamAV, Rspamd, and a modern web UI into a single docker-compose deployment for managing email domains, mailboxes, aliases, and DKIM. ## Install Save as a script file and run: # Mailcow — Dockerized Email Server with Web Administration ## Quick Use ```bash git clone https://github.com/mailcow/mailcow-dockerized cd mailcow-dockerized ./generate_config.sh docker compose pull docker compose up -d ``` ## Introduction Mailcow is an open-source mail server suite that packages all the components needed to run a production email service into Docker containers. It provides a polished web UI for managing domains, mailboxes, aliases, DKIM signing, spam filtering, and antivirus scanning without manual configuration of each underlying service. ## What Mailcow Does - Deploys a complete SMTP/IMAP/POP3 mail server stack via a single docker-compose file - Provides a responsive web administration panel for domain, mailbox, and alias management - Includes SOGo for webmail, calendar, contacts, and ActiveSync device support - Integrates Rspamd for spam filtering and ClamAV for antivirus scanning out of the box - Handles DKIM, SPF, DMARC, and TLS certificate management automatically with ACME support ## Architecture Overview Mailcow orchestrates over a dozen Docker containers: Postfix handles SMTP relay and delivery, Dovecot provides IMAP and POP3 access, SOGo serves as the groupware frontend, Rspamd classifies spam, ClamAV scans attachments, and Nginx terminates TLS. A central MySQL database stores configuration, while Redis handles caching and rate limiting. The mailcow UI communicates with each service through APIs and configuration templating. ## Self-Hosting & Configuration - Requires a Linux host with Docker and Docker Compose, a public IP, and valid DNS records (MX, SPF, DKIM, DMARC) - Run `generate_config.sh` to set hostname, timezone, and initial admin credentials - Access the admin UI at `https://mail.yourdomain.tld` after startup to add domains and mailboxes - Configure backup schedules and retention via the built-in backup script or external snapshot tools - Update by running `./update.sh` which pulls new images and applies migrations automatically ## Key Features - All-in-one deployment: SMTP, IMAP, webmail, groupware, antivirus, and spam filtering in one stack - Modern admin UI with per-domain and per-mailbox quotas, rate limiting, and logging - SOGo groupware with full ActiveSync support for mobile device synchronization - Built-in quarantine management for reviewing and releasing spam-flagged messages - ACME integration for automatic Let's Encrypt TLS certificate provisioning and renewal ## Comparison with Similar Tools - **Mail-in-a-Box** — installs directly on the host OS; Mailcow uses Docker for easier isolation and updates - **Mailu** — similar Docker approach but lighter; Mailcow includes richer groupware via SOGo and a more feature-complete admin UI - **iRedMail** — script-based installer for bare metal; Mailcow's containerized design simplifies backup and migration - **Docker Mailserver** — minimalist container setup; Mailcow provides a web UI and integrated groupware out of the box - **Stalwart** — modern Rust-based server; Mailcow offers a more mature ecosystem with proven groupware integration ## FAQ **Q: What DNS records do I need before installing?** A: At minimum, an A record for your mail hostname, an MX record pointing to it, and SPF/DKIM/DMARC TXT records. Mailcow's documentation provides exact record templates. **Q: Can Mailcow handle multiple domains?** A: Yes. You can add unlimited domains through the admin UI, each with independent mailboxes, aliases, and DKIM keys. **Q: How do I back up my mail data?** A: Mailcow includes a backup script that snapshots the database, mail storage, and encryption keys. Schedule it via cron for automated backups. **Q: Does it support two-factor authentication?** A: Yes. The admin panel and SOGo webmail both support TOTP-based two-factor authentication. ## Sources - https://github.com/mailcow/mailcow-dockerized - https://docs.mailcow.email/ --- Source: https://tokrepo.com/en/workflows/asset-8aa36121 Author: Script Depot