[neomutt-users] Account switching (IMAP): some account-specifics persist on switch.

Pietro Cerutti gahr at gahr.ch
Mon Sep 18 17:16:59 CEST 2023

On Sep 16 2023, 23:50 UTC, "Dom (shymega) Rodriguez" <shymega at shymega.org.uk> wrote:
>On Thu, Sep 14, 2023 at 07:29:15AM +0000, Pietro Cerutti wrote:
>> On Sep 13 2023, 22:17 UTC, "Dom (shymega) Rodriguez" <shymega at shymega.org.uk> wrote:
>> > Hello,
>> >
>> > I've recently switched (back) to Neomutt from my webmail client.
>> >
>> > I've got everything setup, quite happy with it thus far, if it wasn't for one
>> > issue that persists.
>> >
>> > Basically, I have account-specific configurations, and use `account-hook` in
>> > `$XDG_CONFIG_DIR/neomutt/neomuttrc` to activate these settings.
>> >
>> > However, it seems that when I switch from say, the Git account, to my
>> > personal account, certain settings persist, where, for example, the Drafts
>> > folder will still be set to the Git account's Drafts folder, so when I
>> > draft an email from the *Personal* account, it's saved in the Git's
>> > account. Or vice versa.
>> >
>> > I've sanitised my config, and put it into a GitHub repository for review[0].
>> >
>> > Am I missing something?
>> >
>> > Thank you.
>> >
>> > [0]: https://github.com/shymega/neomutt-cfg-bug
>> This is the approach I've developed to handle the switching between IMAP
>> accounts as seamless as possible. You might want to take a look and compare
>> it with yours:
>> https://github.com/neomutt/dyk/blob/main/_dyk/008.md
>I've just taken a look at your approach, and integrated it on my end.
>It's working to switch accounts - do I not need 'account-hook' or 'folder-hook'
>with this approach?

I don't use them, I explicitely context-switch with those macro keys.

>However, I'm still finding my Drafts in the wrong account, or deleted 
>items in the wrong account.
>I should mention - I'm using DavMail on a remote server, sync'd with `mbsync`to
>a local Dovecot IMAP <-> IMAP setup, where Neomutt on my local machine then
>accesses those mailboxes.

At the end of the day, NeoMutt talks with Dovecot via IMAP, right? That 
should be very similar to my setup. I just double checked, and I get 
Drafts setup right. It must be something else on your side, I guess..

Pietro Cerutti
I have pledged to give 10% of income to effective charities
and invite you to join me - https://givingwhatwecan.org

More information about the neomutt-users mailing list