Set "From" based on "To" when replying

Subject: Set "From" based on "To" when replying

Date: Sat, 21 Jan 2012 16:35:10 +0100

To: notmuch@notmuchmail.org

Cc:

From: Simon Campese


Dear Community,

I've got my own domain and when registering or shopping at some website,
I always use email addresses of the form "websitename@mydomain.org", so
for example I use "amazon@mydomain.org" when shopping at amazon. The
reason for this is categorizing incoming mail on the one hand, and
immediately being able to spot the source of spam on the other hand. 

I would like to implement the following behaviour: When replying to a
mail that has "something@mydomain.org" in the "To"-header, I would like
to have the "From"-header of the reply to be automatically set to this
address. 

Is there some kind of reply-hook in notmuch where one could put an
appropriate function? 


Thank you very much for your help,

Simon

Thread: