[neomutt-users] How to best configure NeoMutt with multiple Proton email addresses?
ajs at anvilwalrusden.com
Wed Aug 30 15:29:41 CEST 2023
On Wed, Aug 30, 2023 at 01:22:22AM +0000, technical_fora at proton.me wrote:
>1) SIDEBAR: I would like it to show, at a minimum, the following:
> Others?? Like Sent, Trash, Spam, Drafts, etc.??
If I understand this correctly, for proton these personal@, technical@ and so on are aliases (to one principal account). If I'm correct about that, I think what you are aiming to do actually ought to be done server-side, with sieve or something equivalent. I don't think the MUA is a good place to be categorizing mail after it's gone to a final delivery mailbox unless you intend to read it and dispose of it somehow. I don't know what kind of server-side filtering proton offers, so I can't say more about that.
>2) Desired functionality:
> a) When I have one of the sidebar options selected I only want the
> index to show a list of emails relevant to that selection, i.e., if
> TECHNICAL is selected, the index should only list emails sent to
> technical at proton.me.
The sidebar shows you things in mailboxes, so as long as the mailbox has the right things in it this is automatic.
> b) When I reply to an email in the selected list, I want it to show
> my correct email, i.e., technical at proton.me in the current example.
You need to use send-hook and send2-hook. It looks like this in your dotfile (I generally put these into a separate file and then include them in the main dotfile):
send-hook '~f first-address at example.tld$' 'set command-1; set command-2; set command-3'
send2-hook '~f first-address at example.tld$' 'set command-1; set command-2; set command-3'
It is not always the case that the send-hook and send2-hook need to be redundant, but an awful lot of it seems to need that. Check the manual, but my recollection is that send-hook is processed once when you get into a sending situation whereas send2-hook is processed _after_ you have composed mail and therefore can catch things that send-hook won't. I have never managed to sort out precisely what is redundant without hours of testing, and I am too lazy. I think the only penalty is performance.
> c) When I compose a new email in the selected list view, I want it to
> default to technical at proton.me in this example, and, likewise, the
> correct ones for the other possible options.
This works for me with an account-hook, because I have more than one IMAP account in the same session, but I expect that a folder-hook would work the same way.
> d) I want when either replying to or composing new email, to have a
> custom signature relevant to the sidebar selection.
This is accomplished through the send-hook mentioned above.
>3) Once I have puzzled out all of the above on this laptop, my intent is
>to replicate this setup on my Arch Linux desktop at home (I'm currently
>on an extended-away-from-home trip.). On the Arch Linux desktop I intend
>to locally store copies of my emails for posterity and easy searching.
I never do this so can't comment. I leave everything on the imap server.
ajs at anvilwalrusden.com
More information about the neomutt-users