3

I have been using mutt for a while and got it to work pretty well with 2 gmail accounts. I have 2 macros set to switch from one to the other.

wanting to move to neomutt, the exact configuration is not working anymore.

I can get to my account individually, but I can't swapp from one to the other.

neomuttrc:

source ~/.config/neomutt/accounts/account1
folder-hook 'account1' 'source ~/.config/neomutt/accounts/account1'
source ~/.config/neomutt/accounts/account2
folder-hook 'account2' 'source ~/.config/neomutt/accounts/account2'

macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/account1<enter><change-folder>!<enter>'
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/account2<enter><change-folder>!<enter>'

account1:

set from = "NAME" 
set folder = "imaps://imap.gmail.com"

# Imap
set imap_user = "[email protected]" 
set imap_authenticators = "oauthbearer"
set imap_oauth_refresh_command = " ... "
set imap_check_subscribed  
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Draft"
set header_cache=~/.mutt/cache/headers
set message_cachedir = "~/.mutt/cache/bodies"

# Mailbox definition
mailboxes +GMail/INBOX +GMail/MailingList 

# smtp
set smtp_authenticators = "oauthbearer"
set smtp_oauth_refresh_command = "...."
set smtp_url = "smtp://[email protected]@smtp.gmail.com:587/"
set realname = "NAME"

I also try to set only the macro, which allows me to chose the account to load. But once I have loaded one, I cannot load the other.

Thanks for your help.

NoLoop
  • 83
  • 1
  • 6

1 Answers1

3

the trick was to

set folder = "imaps://[email protected]"

having the same folder for the mailboxes was confusing neomutt.

NoLoop
  • 83
  • 1
  • 6