I’ve been using
as my MUA for over 8 years now.
Long ago I would ssh to my server and run it on local Maildirs, but as soon as I
started using smartphones and multiple computers I had to switch to an IMAP+SSL
header_cache option has long made accessing large mailboxes snappy, and
message_cachedir option available in 1.5 makes browsing through
messages with attachments equally snappy over IMAP.
A useful side effect of message body caching is that it provides an offline copy of entire mailboxes which get synchronized automatically and can easily be read in Mutt as a local mailbox… well, almost.
Because the message caches are just stored in a directory one-message-per-file
and one-mailbox-per-directory, this doesn’t match any known mailbox format so
Mutt will just error out saying it’s not a mailbox when trying to read it with
However, if those messages are saved to a
cur/ subdirectory and a
subdirectory is also present, Mutt will recognize it as a Maildir and read it
Yes, the files inside the
cur/ directory will not have “proper” names with a
colon, version number, comma, and flags, but it’s enough to get Mutt to read
I made a
patch to Mutt 1.5.18
that changes the message cache functions to write to a
cur/ subdirectory and
ensure that a
new/ subdirectory also exists.
With these in place and all of your folders cached, an offline
.muttrc can be
source ~/.muttrc unset spoolfile unset folder unset postponed unset record # required to prevent imap connections even though spoolfile and folder are changed, # for some reason set imap_passive=yes # point to the appropriate directories set spoolfile=~/.mutt-cache/imaps:firstname.lastname@example.org/inbox/ set folder=~/.mutt-cache/imaps:email@example.com/
and then Mutt can be invoked as (or an
offline_mutt shell alias set to):
mutt -R -F ~/.muttrc.offline
which will provide read-only views of all of your mailboxes and retain all of the other macros and searching, filtering, and other functions you already have configured in Mutt.
Note: not using
-R may change message flags which will rename the cache files
and cause them to get out of sync.