This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

What is Dovecot?

As an IMAP and POP3 server, Dovecot provides a way for mail-user agents [MUA] to access their mail. As such, Dovecot is NOT responsible for receiving mail from other servers. Dovecot presents mail already stored on the system to MUA's.

IMAP and POP3 are the two common protocols used by MUA's to communicate with mail storage servers. POP3 is commonly used by users who do not have a high-speed connection to the mail server. One of POP3's basic principles is that MUA's download mail and store it locally - and then delete the mail from the server. IMAP is intended for LAN's and high-speed connections. The intent of IMAP is contact the server each time a given message needs to be read (apart from MUA-specific caching). Dovecot has a number of optimizations for IMAP that make it an exceptionally good performer for most IMAP applications.

With the possible, optional, exception of the deliver LDA, Dovecot is not involved with reception, delivery, and storage of mail. That function is provided by a MTA such as postfix. It is the MTA that determines where and how mail is stored - Dovecot must then be configured to retrieve the mail accordingly. Obviously, a working MTA installation is a prerequisite of a working Dovecot installation.

There are two primary storage options of mail in the *NIX world - mbox and Maildir. Mbox stores multiple messages - sometimes hundreds or thousands of messages - in a single file. Maildir stores each message a separate file. While there may have been some issues with older filesystems that made mbox reasonable, for most new installations maildir offers a far more robust implementation and all-things-being-equal is the recommended choice.