There are many articles on this topic none of which work for me. The .muttrc has the following related to multiple accounts (only IMAP is used + of course SMTP):
source "~/.mutt/account1" folder-hook $folder 'source ~/.mutt/account1' source "~/.mutt/account2" folder-hook $folder 'source ~/.mutt/account2' macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/account1<enter><change-folder>!<enter>' macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/account2<enter><change-folder>!<enter>' # Mailboxes bind index G imap-fetch-mail macro index gi "<change-folder>=INBOX<enter>" "Go to Inbox" macro index gs "<change-folder>=$my_sent<enter>" "Go to Sent" macro index gd "<change-folder>=$my_drafts<enter>" "Go to Drafts" macro index gt "<change-folder>=$my_trash<enter>" "Go to Trash"
The account files are as (e.g. for account1, the other one would be the same but the names of the folders would be in different language):
set my_drafts = "Drafts" set my_drafts_noquote = "Drafts" set my_sent = "Sent<quote-char><space>Items" set my_sent_noquote = "Sent Items" set my_trash = "Deleted<quote-char><space>Items" set my_trash_noquote = "Deleted Items" set imap_user = "username" set folder = "imaps://outlook.office365.com:993/" set imap_authenticators = "login" set mbox = "+INBOX" set spoolfile = "+INBOX" set record = +$my_sent_noquote set postponed = +$my_drafts_noquote set trash = +$my_trash_noquote set smtp_url = "smtp://email@example.com:587" set smtp_authenticators = "login" set copy = "yes" account-hook $folder "set imap_user=username"
So after starting mutt, i end up being in INBOX for
account2. If I press
gt all of them get me where I want to be (Sent folder, drafts or trash). Then I switch to account on by
F2 and get to INBOX folder correctly but
gd no longer work (Note that account1 and account2 use different names for trash, drafts and sent). (What it shows is "Sent items" does not exist but the words "sent items" are written in language of account2 but with malformed characters).
How do i need to correct the configuration?