$linuxjunkies
>

maildir

also: Maildir format

A maildir is a filesystem-based mail storage format that stores individual email messages as separate files in a directory structure, rather than concatenating them into a single file.

Maildir uses a simple directory hierarchy to organize emails: a main folder contains subdirectories like cur (current/read messages), new (new unread messages), and tmp (temporary files). Each email is stored as a separate file with a unique name.

This design avoids the locking problems of mbox format (which stores all messages in one file) and makes it safe for concurrent access by multiple processes. Each message file is atomic—either fully written or not at all—preventing corruption.

Example structure: /home/user/Maildir/new/1234567890.M12345P6789Q0.hostname:2,S where the filename encodes delivery time, host identity, and flags (like S for seen/read).

Maildir is widely supported by modern mail servers (Dovecot, Postfix) and clients, making it the preferred format for Unix-like systems where reliability and concurrent access matter.

Related terms