#.muttrc set folder = imaps://imap.domain.com/ set imap_user = email@example.com set imap_pass = your-imap-password set spoolfile = +INBOX mailboxes = +INBOX
A simple configuration file in 5 lines to access the inbox of an account and read e-mail.
folder is the location of the accounts e-mails.
imap_pass is the username and password to access the account.
In an account the e-mails are located in mailboxes with different uses.
All accounts has an mailbox where new e-mails arrive, and usually it is named INBOX.
In mutt this folder is defined with the
spoolfile setting, and it is also the folder that will be displayed on startup. The + represents the account folder so it can be written shorter.
mailboxes should list all the mailboxes to be checked for new e-mail.
To add more than one account hooks are used. The concept is to a certain event hook some execution, as to run commands to set settings. E.g. the if we want to access the e-mail from a certain account we might want to use a certain setting, but for another account we want to use another setting.
folder-hook will run commands dependent on the folder (as mutt defines folder which is different from mailbox).
If you are replying to an email in the folder of one account you want to have that accounts e-mail address as sender.
account-hook will run commands when mutt needs to connect to a remote server. Thus settings as passwords can be set using this hook.