Maildir format

Created on 2023-02-28T01:29:45-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Each mail message is encoded as:

However unlike mbox each message has its own file in a directory.

A whole mailbox has three directories within itself: new, cur, and tmp.

tmp: when storing new messages they are written here, flushed, then atomically moved to 'new.'

new: messages deposited to a mailbox but not acknowledged by the mail client belong here.

cur: messages that mail software has acknowledged as newly arrived are moved to this directory. mail lives here until the user moves or deletes it.

Atomic moves are typically done with `rename` or by hardlinking then unlinking the original.