Choose 'From:' address based on 'To: address

Cameron Simpson cs at cskk.id.au
Thu Feb 25 21:55:45 UTC 2021


On 25Feb2021 09:56, Will Yardley <mutt-users at veggiechinese.net> wrote:
>On Thu, Feb 25, 2021 at 04:11:02PM +0000, Alexander Huemer wrote:
>> Is there a configuration option to choose which 'From:' email address
>> shall be used if a mail to a certain 'To:' address is composed? If a
>> 'To:' address isn't in the mapping, then the 'set from' configuration
>> setting should be the fallback.
>
>I do something like this:
>
>set use_from
>set from="luser at example.net"
>send-hook . 'unmy_hdr From:'
>set reverse_name
>alternates '(.*@example\.net|someuser at example\.com)'

reverse_name and alternates: this is only effective for personal email, 
meaning email with one of your own addresses in the to/cc. Most mailing 
lists do not do that, so there's no way to "reverse" from the to/cc to 
the from of the reply.

You want Jon's send-hook based approach, setting from etc based on the 
target address of the message you're composing.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Mutt-users mailing list