Mail storage
System mailspool and home archives
By default, mutt looks for your inbox mailfolder in the system mailspool. This mailspool is usually an mbox file somewhere like /var/spool/mail/$USER (where $USER is your username). To find out where your mailspool is, type this command in your shell:
echo $MAIL
Your mailspool is just one folder and you should only use it for current mail. Keep old mail archives and filter mailing-lists to mailfolders somewhere in your home directory. By default mutt looks for these folders in the ~/Mail/ directory.
Many people find it more logical to have everything, mailspool included, in their home directory. Look at the filtering mail section to find out how to get your system to deliver incoming mail there.
You can use this configuration command to get mutt to look for your mailspool somewhere other than /var/spool/mail/$USER :
set spoolfile=~/Mail/inbox
Of course your spoolfile doesn’t have to be a local file at all - mutt allows you to keep it anywhere, including on an IMAP or POP3 server. See the mail accounts section for how to connect mutt to a remote account.
Creating mail folders
To create a new mail folder, just move or copy a message and type the name of your folder; mutt will create the folder for you if it doesn’t already exist (move/save is the s key and copy is shift & c).
mbox
The traditional unix mailfolder format consists of all the messages stored one after the other in a single plain-text file. This is the default format for system mailspools and is the default folder format for mutt.
There are advantages and disadvantages with mbox format. It is slow when removing messages, as the whole thing has to be rewritten, and it can be a mess when several applications want to write to an mbox at the same time. Advantages are that the mbox format is universal and can be read by many other programs.
So use mbox in these situations:
- Local mailfolders that need to be readable and writable.
- Transferring mailfolders between systems.
- Mail backups.
Compressed folders
Mutt can read and write mailfolders compressed with gzip, bzip2 or xz, which is worth having for archives of old mail that you rarely open. This used to require a third-party patch; it has been part of mutt since version 1.8, using the open-hook , close-hook and append-hook commands.
It is a compile-time option though, so check that your build has it before writing any hooks - look for +USE_COMPRESSED in the output of:
mutt -v
There are ready-made hooks for the common compression programs in contrib/sample.muttrc-compress , and the details are in the compressed folders section of the manual.
Note that any corruption of a compressed mailfolder is generally not recoverable, so use this for archives, not for folders that are being written to.
Maildir
Maildir is a folder format where each message is a separate file in a directory full of other messages. It is the sensible default for local mail these days.
The advantages of Maildir are that no locking is required, so multiple applications can work on the same mailfolder at the same time without messing up. Plus, having one file per message makes manipulating mail with scripts much simpler.
The disadvantages are that some file-systems are inefficient with both small files and with thousands of files in one directory.
Mutt can automatically detect Maildir. Since mutt 2.4.0 a directory is only recognised as a Maildir if it contains all three of the cur , new and tmp subdirectories, so if mutt suddenly stops seeing a folder that it used to open, that is why. If you want mutt to create Maildir by default rather than mbox, use this configuration command:
set mbox_type=Maildir
Use Maildir in these situations:
- Folders where mail is constantly being delivered, moved and deleted such as mailspools and mailing-list folders.
- Folders that are synchronised from a remote server by a tool like mbsync - see the collecting mail section.
- Folders with large individual messages; the time taken to open a Maildir is a function of the number of messages, whereas the time taken to open an mbox file is a function of its total filesize.
- When you need to write scripts to manipulate messages en-masse, using Maildir format mailboxes is considerably easier than mbox.
- When you want to index your mail with a search tool - see the searching mail section.
MH
MH is a one-file per message format much like Maildir, with all the same advantages and disadvantages. You are unlikely to choose it for new mail, but mutt reads it happily if you have an old archive lying around.
POP3
POP3 is a way of accessing a remote mailfolder on a POP3 server. Traditionally, mail user agents simply connect to a POP3 mailbox and retrieve everything.
Mutt supports browsing a POP3 account as if it was any other mailfolder. You can sort, delete and read messages without having to retrieve them locally first. However, mutt isn’t much use if all you want to do is fetch and download every message to your local machine - see the collecting mail section for ways to do this properly.
To browse a POP3 mailbox, just hit c to change mailboxes. Then, instead of typing the name of a local mailbox, you can enter the location of your POP3 server. This is much like typing the URL for a page in a web-browser:
pops://username@mail.example.com/
Use pop:// instead of pops:// only if the server genuinely has no TLS, which in practice means never.
Use POP3 mail storage in these situations:
- When you need to have a small mailbox, such as a mailspool, accessible from various network locations.
- When the server offers nothing better.
IMAP
IMAP is the more sophisticated successor to POP3, the name is an acronym of Internet Message Access Protocol. It is what almost every mail provider offers today.
IMAP can be used as a full alternative to local mail storage. You can create sub-folders and manipulate messages in every way. IMAP locations are addressed in the same web-browser style as POP3 mailboxes:
imaps://username@mail.example.com/
You can access individual folders in your account by using ‘/’ as a path separator:
imaps://username@mail.example.com/path/to/mailbox/
Mutt caches message headers and bodies locally so that reopening a large IMAP folder is quick. This is not on by default; you just have to tell mutt where to put the cache:
set header_cache = ~/.cache/mutt/headers
set message_cachedir = ~/.cache/mutt/bodies
See the caching section of the manual for the details, including how to clean the cache up.
What mutt still doesn’t have is a disconnected mode - if the network goes away mid-session, so does your mail. If you work offline often, or your provider is slow, synchronise the account down to a local Maildir instead with a tool like mbsync; this is covered in the collecting mail section.
Use IMAP mail storage in these situations:
- When you have a reliable network connection to your mailserver.
- For accessing your mail from different locations.
- When you need to be able to read your mail using different mail user agents.
Network filesystems
If your home directory is already served over NFS or similar, your mail can simply live there and mutt will read it like any other local folder. Mutt checks whether file locking works when opening a folder, which means mbox files have a tendency to end up read-only over NFS - use Maildir for anything on a network filesystem.
This was once a common arrangement and is now mostly confined to institutions that already run it. For anything new, IMAP is the better answer.
Last updated 31 August 2026.