Skip to content
Mbox Viewer

Maildir

A mailbox format that stores each email message as a separate file within a directory hierarchy, rather than concatenating all messages into a single file like MBOX.

Maildir was introduced by qmail and is now used by many Unix/Linux mail servers including Dovecot and Courier. In the Maildir layout, each message lives as its own file inside one of three subdirectories — new, cur, and tmp — with additional subdirectories representing folders or labels. This per-file design eliminates locking issues that can affect MBOX files when multiple processes access the mailbox simultaneously.

Because every message is a discrete file, Maildir makes it easy to add, delete, or move individual messages without touching other messages. However, managing a mailbox with hundreds of thousands of files means that filesystem performance on some operating systems can become a bottleneck, and tools designed for MBOX may not read Maildir directly.

Converting a Maildir archive to MBOX is a common step before importing mail into tools or services that expect MBOX input. Standard utilities such as mb2md, or scripts using formail, can perform this conversion. Google Takeout produces MBOX rather than Maildir, so users downloading Gmail archives will work with MBOX files directly.

Related terms

Read your MBOX files on your Mac