A mail server (or email server) is a system that sends, receives, and stores email for users. While traditional documentation focuses on individual components (MTA, MDA, MUA), most modern deployments use complete mail server solutions that integrate all components into a single, cohesive platform.
This page covers both complete mail server suites (recommended for most deployments) and individual components (for custom setups).
| Type | Solutions |
|---|---|
| 📦 Complete Suites | mailcow, iRedMail, Mail-in-a-Box, Modoboa |
| 📤 MTA (Mail Transfer Agent) | Postfix, Exim, Sendmail, qmail |
| 📥 IMAP/POP3 Server | Dovecot |
| 📬 MDA (Mail Delivery Agent) | Procmail |
Need help? See the Mailserver FAQ for common questions.
Complete mail server suites provide an all-in-one solution with pre-configured components, web interfaces, and simplified management. These are recommended for most deployments.
| Solution | License | Docker | Webmail | ActiveSync | Difficulty | Best For |
|---|---|---|---|---|---|---|
| mailcow | GPL-3.0 | ✅ Native | ✅ SOGo | ✅ Yes | Easy | Modern deployments, Docker users |
| iRedMail | GPL + Commercial | ⚠️ Manual | ✅ Roundcube | ⚠️ SOGo/Z-Push | Moderate | Enterprise, traditional installs |
| Mail-in-a-Box | CC0-1.0 | ❌ Native | ✅ Roundcube | ✅ z-push | Easy | Ubuntu appliances, simplicity |
| Modoboa | ISC | ✅ Available | ✅ Built-in | ⚠️ Plugin | Moderate | Python/Django environments |
mailcow is a modern, Docker-native mail server suite based on Postfix, Dovecot, Rspamd, and SOGo. It provides a complete groupware solution with ActiveSync support.
iRedMail is a mature, battle-tested mail server solution that has been in development since 2007. Available in open-source and enterprise editions.
Mail-in-a-Box is a one-click mail server appliance designed for Ubuntu. It automates everything from DNS configuration to SSL certificates.
👉 Full Mail-in-a-Box Documentation
Modoboa is a Python/Django-based mail server platform with a modern web interface and modular architecture.
For custom setups or when building a mail server from scratch, you’ll need to combine individual components.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ MUA │ ───► │ MTA │ ───► │ MDA │
│ (Mail User │ │ (Mail │ │ (Mail │
│ Agent) │ │ Transfer │ │ Delivery │
│ │ │ Agent) │ │ Agent) │
└─────────────┘ └─────────────┘ └─────────────┘
Outlook, Postfix, Procmail,
Thunderbird Exim, Sendmail Dovecot (IMAP)
Responsible for sending and receiving emails between mail servers.
| MTA | License | Status | Best For |
|---|---|---|---|
| Postfix | IBM Public License 1.0 | ✅ Active | General purpose, security-focused |
| Exim | GPL-2.0 | ✅ Active | Complex routing, flexible configs |
| Sendmail | Sendmail License | ⚠️ Legacy | Historical systems |
| qmail | Public Domain | ⚠️ Legacy | Security-minimalist setups |
Provide mailbox access for email clients.
| Server | License | Status | Best For |
|---|---|---|---|
| Dovecot | LGPL-2.1 / MIT | ✅ Active | Most Linux distributions |
Handle delivery of email to local mailboxes and filtering.
| MDA | License | Status | Best For |
|---|---|---|---|
| Procmail | GPL-2.0 | ⚠️ Legacy | Legacy filtering systems |
| Dovecot LDA | LGPL-2.1 | ✅ Active | Modern Dovecot deployments |
| Maildrop | GPL-2.0 | ✅ Active | Complex filtering rules |
| Protocol | Purpose | Standard Port | TLS Port |
|---|---|---|---|
| SMTP | Sending mail | 25 (relay), 587 (submission) | 465 (SMTPS, legacy) |
| IMAP | Reading mail | 143 | 993 (IMAPS) |
| POP3 | Reading mail (download) | 110 | 995 (POP3S) |
| Submission | Client mail submission | 587 | — |
| CalDAV | Calendar sync | — | 443 (HTTPS) |
| CardDAV | Contact sync | — | 443 (HTTPS) |
Security Note: Always use TLS/SSL encryption. Port 465 (SMTPS) is deprecated but still widely used. Prefer port 587 with STARTTLS.
✅ Recommended: Use a complete mail server suite like mailcow, iRedMail, or Mail-in-a-Box
Advantages:
⚙️ Custom Build: Combine individual components (Postfix + Dovecot + Rspamd + Roundcube)
Advantages:
Regardless of your choice, implement these security measures: