setting signature based on From/To in mutt.

Uncategorized

Lazyweb, help me out.
I use mutt to read multiple mail accounts. Using alternates, I have it rigged so that when I reply to someone it sets my From: to the same as the address that they sent the mail To: Straight-forward stuff.

What I’d like to do next is set my .signature based upon the same rule.
I thought that this can be done easily enough with send-hooks like..
send-hook mutt- 'set signature=~/.signature1; my_hdr From: Dave Jones <emailaddress1>'
send-hook mutt- 'set signature=~/.signature2; my_hdr From: Dave Jones <emailaddress2>'

But that just seems to make it pick signature1 regardless of any header.

I googled a while, but turned up dead ends. profiles look interesting, but I’d rather not have to swap between things manually. Likewise, it looks possible to do it on a per-folder basis, but I want this to work with =mbox where all accounts land unfiltered.

Anyone set up something similar ?

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

2 Comments

2 Comments

  1. miffe  •  Nov 13, 2009 @00:15

    This works for me
    send-hook “~f addr1@server.com” ’set signature=sig1′
    send-hook “~f addr2@other.org” ’set signature=sig2′

  2. robbat2  •  Nov 14, 2009 @13:47

    I mix per-folder and profiles. The hardest thing with per-folder is actually making sure it resets sometimes.