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

Alexander Huemer alexander.huemer at xx.vu
Tue Mar 2 11:07:01 UTC 2021


On Thu, Feb 25, 2021 at 03:08:12PM -0500, Jon LaBadie wrote:
> On Thu, Feb 25, 2021 at 04:11:02PM +0000, Alexander Huemer wrote:
> > Hi
> > 
> > I am subscribed to several mailinglists and use different email
> > addresses for them, for various reasons.
> > 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 somehow remember to have read years ago, that somebody has built a
> > workaround for this issue by hacking something into VIM with some code
> > completion feature that gives at least a way to choose an address from a
> > list, but I cannot find the reference to that anymore.
> > 
> > Any thoughts on this would be highly appreciated.
> 
> In a separate file I keep a bunch of mailing list send-hooks something
> like the following that is sourced into ~/.muttrc :
> 
> send-hook 'mutt-users at mutt.org' 'my_hdr From: "Jon LaBadie" <mutter at jgcomp.com>'
> 
> Depending on the mailing list I may also have a similar line for
> the Reply-To: header and a "set signature=..." to specify a unique
> signature file.

This works like a charm, thank you!

-Alex


More information about the Mutt-users mailing list