When I start Mutt, the default mailbox is whatever is in the $MAIL environment variable.
How can I startup Mutt, pointing to a different mailbox rather than $MAIL, or better still, how can I change the current mailbox from within Mutt?
I have a clue as to using a .muttrc file. Is there an example of a .muttrc which can open multiple inboxes?
What I do is set the
MAIL
environment variable to point to my mailbox. That way the setting applies to other programs (e.g. shells that show “you have new mail”). But you can do it from.muttrc
as well:To start mutt showing a different mailbox as a one-off, run
mutt -f /alternate/mailbox
. Within mutt, typec
to change to a different mailbox. Afterc
, you can type the path to the mailbox, or you can use one of the shortcuts (see “Mailbox shortcuts” in the manual) such as!
to refer tospoolfile
(or$MAIL
) and=foo
to refer to$folder/foo
where$folder
is defined in your.muttrc
asIf receive mail in several mailboxes and would like mutt to tell you when you receive mail in any of them, look up “Monitoring incoming mail” in the manual; basically you need to add this to your
.muttrc
: