I use mutt with several different email accounts. Currently I have a
different muttrc file for each account: muttrc.account1,
muttrc.account2, etc. and I launch mutt specifying one of these muttrc
files with -F.
I know how to create a master ~/.muttrc file with folder-hooks that
source each of the account-specific muttrc files when I open a folder of
that account. That would let me just launch 'mutt' and then move between
my accounts within the one mutt instance. But the problem is this
feature of folder-hooks:
> Note that the settings are not restored when you leave the mailbox.
> For example, a command action to perform is to change the sorting
> method based upon the mailbox being read:
>
> folder-hook mutt set sort=threads
> However, the sorting method is not restored to its previous value
> when reading a different mailbox. To specify a default command, use
> the pattern ``.'':
>
> folder-hook . set sort=date-sent
That means that for every variable I set in a muttrc.accountX file (and
I have several of these files) I have to include a default case in the
master muttrc file, or I'll get unexpected behaviour. This is a recipe
for disaster, at some point I will edit a muttrc.accountX file and
forget to add a default case. There must be a better way?