[neomutt-users] How to best configure NeoMutt with multiple

boB i_persevere technical_fora at proton.me
Thu Aug 31 09:58:11 CEST 2023

I do believe I have made significant progress tonight toward attaining
my goals, including seeing now where I screwed up the threading of this
thread!  However, due to my ignorance it took me a long while to figure
out both how to properly use folder-hook and which file to place it in.
This was complicated by my not understanding proper folder addressing.
But eventually I got things nuked out.

On 30.08.2023 19:16, technical_fora at proton.me wrote:
>On 30.08.2023 09:29, Andrew Sullivan wrote:
>>On Wed, Aug 30, 2023 at 01:22:22AM +0000, technical_fora at proton.me
>>>1) SIDEBAR:  I would like it to show, at a minimum, the following:
>>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.
>Light bulb moment!  These are indeed aliases that Proton Mail provides.
>Now I can visualize how this can be done.  Proton has both a fairly
>full-featured interactive filter generation ability (up to 100 active
>filters on the paid plan) and the sieve capability, too.  I had not
>heard of sieve previously.  Thanks for that.

This took more doing than I thought it would to get all my many emails
sorted into their proper folders server-side.  Most I was able to handle
with Proton's interactive filter-building software, but for, in
particular, mailing list emails I had to write a sieve script to delve
into the appropriate "X-" fields before I was able to get them where I
wanted them.

>And I thought from the get-go that the hooks you mention later would be
>needed.  I think I now have a viable game plan thanks to your help!

The send hooks I finally figured out I placed them in my root neomuttrc

folder-hook +Folders/1_WORK "source $HOME/.config/neomutt/accounts/work"
folder-hook +Folders/2_MEDICAL "source $HOME/.config/neomutt/accounts/medical"
folder-hook +Folders/3_TECHNICAL "source $HOME/.config/neomutt/accounts/technical"
folder-hook +Folders/4_COMMERCIAL "source $HOME/.config/neomutt/accounts/commercial"

Each file sourced had two lines of the form:

set from = my_desired_email at proton.me
set real_name = "my_desired_display_name"

This seems to be doing what I want.  It even propagates to subfolders
seamlessly with the parent folder's desired name and email address.
Also, I imagine if I need more folder-specific functionality in the
future I will be able to add it to each folder's associated file.  Also,
I did not need to do anything special with my account's main email
address beyond the original configuration I had done.

Thanks to those who helped!

Wishing you only the best,
boB i_persevere

Nanakorobi yaoki:  Fall down seven times, get up eight.
	-- Japanese adage

More information about the neomutt-users mailing list