The IMAP (Internet Message Access Protocol) server is the backbone of any self-hosted email infrastructure. It stores mailboxes, handles client connections, manages access control lists, and provides the interface through which email clients like Thunderbird, Outlook, or mobile apps retrieve messages. Choosing the right IMAP server impacts performance, scalability, and the features available to your users.
This guide compares three mature, open-source IMAP server implementations: Dovecot, Cyrus IMAP, and Courier IMAP. Each has a different architecture, feature set, and operational profile suited to different deployment scales.
Quick Comparison
| Feature | Dovecot | Cyrus IMAP | Courier IMAP |
|---|---|---|---|
| GitHub Stars | 1,204 | 632 | N/A (SourceForge) |
| Development Status | Very Active | Active | Maintenance |
| Storage Format | Maildir, mbox | Cyrus native (skiplist) | Maildir, Maildir++ |
| Virtual Users | Yes (SQL, LDAP, PAM) | Yes ( Cyrus DB) | Yes (authlib) |
| Sieve Support | Yes (built-in) | Yes (built-in) | No |
| Full-Text Search | Yes (FTS plugins) | Yes (built-in) | No |
| Replication | Yes (dsync) | Yes (Murder/sync) | No |
| Clustering | Yes (director) | Yes (Murder) | No |
| JMAP Protocol | Yes (experimental) | Yes (production) | No |
| LMTP Support | Yes | Yes | No |
| Quota Support | Yes | Yes | Yes |
| ACL Support | Yes | Yes | No |
| License | MIT/LGPL-2.1 | BSD | GPL |
Dovecot — The Modern IMAP Standard
Dovecot is the most widely deployed open-source IMAP server in production today. It powers mail systems for millions of users worldwide and is the default IMAP server in most Linux distributions.
Installation
| |
Docker Compose Configuration
| |
Key Configuration
| |
Key Features
- Sieve filtering: Server-side email filtering with the Sieve language, supporting rules, vacation responders, and automatic sorting
- Full-text search: Pluggable FTS backends (Solr, Elasticsearch, Lucene) for fast message body searches
- Replication: Real-time mailbox replication between servers using dsync, enabling high availability
- Director: Built-in load balancer that routes users to the same backend server consistently
- JMAP support: Experimental but functional JMAP (JSON Meta Application Protocol) for modern client access
Cyrus IMAP — The Enterprise Choice
Cyrus IMAP is designed for large-scale deployments. Its native storage format and architecture are optimized for servers handling hundreds of thousands of mailboxes with strict consistency guarantees.
Installation
| |
Key Configuration
| |
Key Features
- Native storage format: Cyrus uses its own skiplist-based storage, optimized for high IOPS and concurrent access
- Murder clustering: Native distributed architecture for multi-server deployments with automatic mailbox distribution
- JMAP production support: Full JMAP protocol implementation for modern email clients
- Sieve with CalDAV/CardDAV: Unified messaging, calendar, and contacts server in a single platform
- Strict consistency: ACID-compliant operations ensure no message loss even during crashes
Courier IMAP — The Lightweight Alternative
Courier IMAP is one of the oldest open-source IMAP implementations. While no longer in active development, it remains in use in legacy systems and smaller deployments where simplicity is valued over advanced features.
Installation
| |
Docker Compose Configuration
| |
Key Features
- Maildir++ format: Extended Maildir supporting subfolders within the Maildir structure
- Simple architecture: Single-process-per-connection model that is easy to understand and debug
- Shared folders: Support for shared mailboxes between users (limited compared to Dovecot/Cyrus)
- Courier authentication library: Pluggable authentication supporting MySQL, PostgreSQL, LDAP, and PAM
Why Self-Host Your IMAP Server?
Running your own IMAP server means your email never leaves your infrastructure. Cloud email providers scan message contents for advertising, enforce their own retention policies, and can suspend accounts at their discretion. With a self-hosted IMAP server, you control access, retention, and data handling policies entirely.
Privacy and regulatory compliance are critical drivers. GDPR requires data controllers to know where personal data is stored and processed. When you self-host, every email byte resides on hardware you own or lease, with audit logs you control. This eliminates the data processing agreements and cross-border transfer complications inherent in using third-party email services.
Cost efficiency scales dramatically with user count. Commercial email hosting typically charges $3-10 per user per month. For a 50-user organization, that is $1,800-6,000 annually. A self-hosted IMAP server on a $20/month VPS handles that load with room to grow, paying for itself within the first month.
For organizations building a complete email infrastructure, the IMAP server sits alongside other critical components. Our email archiving comparison covers archive solutions that work with all three IMAP servers, while our MTA guide explains how to configure the mail delivery layer. For migrating between IMAP servers, our IMAP synchronization article provides detailed migration procedures.
Choosing the Right IMAP Server
Choose Dovecot if: You need the best overall feature set, Sieve filtering, or are building a new deployment from scratch. Dovecot is the default choice for most self-hosted email setups due to its active development, excellent documentation, and broad protocol support.
Choose Cyrus IMAP if: You operate at enterprise scale with hundreds of thousands of mailboxes, need JMAP for modern client access, or require strict ACID guarantees for message storage. Cyrus is the choice of ISPs and large hosting providers.
Choose Courier IMAP if: You are maintaining a legacy system that already uses Courier, or have specific compatibility requirements with older mail clients. For new deployments, Dovecot or Cyrus are strongly recommended.
FAQ
Can Dovecot handle millions of mailboxes?
Yes. Dovecot’s director-based architecture and dsync replication enable horizontal scaling across multiple backend servers. Large hosting providers run Dovecot clusters handling millions of mailboxes with sub-second login times.
Does Cyrus IMAP work with standard Maildir format?
No. Cyrus uses its own native storage format (skiplist-based), not Maildir. This is a deliberate design choice for performance and consistency. Migration from or to Maildir requires conversion tools like mb2md or mb2md-rh.
Which IMAP server supports server-side filtering?
Dovecot and Cyrus IMAP both support Sieve filtering. Courier IMAP does not support Sieve — users must configure client-side filtering rules instead. Sieve is important because it processes mail before the client retrieves it, enabling automatic sorting, spam handling, and vacation responses.
How do I migrate mailboxes between IMAP servers?
The imapsync tool is the standard approach for mailbox migration between any IMAP servers. It connects to both source and destination servers via IMAP and copies messages while preserving flags, folder structure, and timestamps. For Dovecot-to-Dovecot migration, dsync provides faster, native replication.
Do these servers support mobile push notifications?
None of these servers implement push natively over IMAP (IDLE is the closest IMAP equivalent). For true push notifications on mobile devices, consider running a JMAP-capable server (Cyrus has production JMAP support) or using a synchronization bridge like zpush for Exchange ActiveSync compatibility.
What is the performance difference between the three?
For small deployments (under 1,000 users), all three perform similarly. At scale (10,000+ users), Cyrus IMAP generally leads in raw I/O performance due to its native storage format, while Dovecot excels in feature-rich deployments where Sieve, FTS, and replication are needed. Courier IMAP does not scale well beyond a few hundred concurrent users.