On 2019-07-26, 05:12, g...@riseup.net wrote:
> 1. When composing messages, mutt ask To: or recipient adress and Subject: and 
> then go to editor. How to make mutt ask for From: or sender address only and 
> then go to editor?
> This is useful for people with multiple accounts or multiple identities in 
> each email account if they set custom headers based on each email account or 
> identity eg, From: address.

As it has been suggested earlier, a common way to handle this is the
reply-hook. I would like to elaborate on this a bit, since you mentioned
custom headers per identity:

I'm using a profiles.rc file as a dispatcher for all identities
(reply-hooks and shortcuts to toggle between identities) and as a fix
point to include from muttrc.

Each identity is a separate rc file which is then source'd.

An example identity could look like this in the profiles.rc:

    macro index <Esc>1 '<enter-command>source
    macro compose <Esc>1 '<enter-command>source
    reply-hook '~C ^per...@example.com$' 'source

That'll enable the <Esc>1 shortcut in both index and compose to switch
to profile 1. In compose it will also set the from accordingly (using a
alias that's set inside the 1.rc).

The 1.rc might look like this:

    source ~/.config/neomutt/profiles.d/clear.rc

    set from="per...@example.com"
    set realname="Example Person"
    alias current-from per...@example.com (Person)
    set pgp_sign_as = ...
    set crypt_autosign = ...
    set record = +sent-mail
    set postponed = +drafts
    set trash = +dustbin

clear.rc is a generic "blank profile" that resets all values so make
sure that profiles don't bleed into each other.

And from then on you can just add all the values that you want to have
set in this identity.

As you can see, you can even set the folders for sent mail, postponed
messages and the trash.

Hope this helps!

Reply via email to