Maildir Mailbox FormatThe Maildir e-mail format debuted with the qmail server in the mid-1990s. Each mailbox folder is a directory and each message a file. This improves efficiency because individual emails can be modified, deleted and added without affecting the mailbox or other emails, and makes it safer to use on networked file systems such as NFS. For information on how to configure Maildir in Dovecot, see Maildir Configuration.
Dovecot ExtensionsSince the Maildir standard doesn’t provide everything needed to fully support the IMAP protocol, Dovecot had to create some of its own non-standard extensions. The extensions still keep the Maildir standards compliant, so MUAs not supporting the extensions can still safely use it as a normal Maildir.
IMAP UID mappingIMAP requires each message to have a permanent unique ID number. Dovecot uses the dovecot-uidlist file to keep UID <-> filename mapping. The file is basically in the same format as Courier IMAP’s courierimapuiddb file, except for one difference (see below). The file begins with a header: 3 V1275660208 N25022 G3085f01b7f11094c501100008c4a11c1
Filename | Explanation |
---|---|
1491941793.M41850P8566V0000000000000015I0000000004F3030E_0.mx1.example.com,S=10956:2,STln | UNIX timestamp of arrival |
1491941793.M41850P8566V0000000000000015I0000000004F3030E_0.mx1.example.com,S=10956:2,STln | Size of e-mail |
1491941793.M41850P8566V0000000000000015I0000000004F3030E_0.mx1.example.com,S=10956:2,STln | S = seen (marked as read) |
T = trashed | |
l = IMAP tag #12 (0=a, 1=b, 2=c, etc) as defined in that folder’s dovecot-keywords file. | |
n = IMAP tag #14 (0=a, 1=b, 2=c, etc) as defined in that folder’s dovecot-keywords file. |