set reverse_name=yesThis will only work if your address matches your alternates. (see next section)
Important: As MuttFaq/Header says, there must be no "my_hdr From:" active: It would overrule "$reverse_name" and render the above setting useless. If you configured your default From: address using a send-hook, you will need to change this. Please see below.
If you want to also include the real names the person that e-mailed you used, you need to use this.
set reverse_realname=yesNote: This var is set to 'yes' by default, so remember to change it if you do not want to use those names.
Also verify that the $use_from variable is set to "yes". It is correct by default, but may be unset say in Debian's global /etc/Muttrc.
set alternates="^(john@isp1\\.com|john@isp2\\.com)$"When in reality, it will only work if you type it like this:
alternates ^john@isp1\\.com$ ^john@isp2\\.com$Please note that you can't add a "real name" to the alternates variable. This is for addresses only. So if you set reverse_realname to 'no' and want to specify your realnames, see the next section to find out how to deal with them.
send-hook . 'set realname="John Doe"' send-hook "~f ^john@isp2\\.com$" 'set realname="Johnny"'
set from=john@isp1.com set realname="John Doe"
In addition to this static setup, you can change $from and $realname at will, perhaps in folder-hooks or macros.
send-hook . "unmy_hdr From:" send-hook ^emm@example\\.com$ "my_hdr From: agent 007 <john@isp1.com>"
This override has a weakness: Mails resent to those recipients with the <bounce-message> function (bound to the [b] key by default) will be Resent-From: your default account, instead of the expected fixed account.