Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5A94E431FBD for ; Thu, 2 Feb 2012 09:27:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gs2SJvR155bP for ; Thu, 2 Feb 2012 09:27:03 -0800 (PST) Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 76C1B431FAE for ; Thu, 2 Feb 2012 09:27:03 -0800 (PST) Received: by lahd3 with SMTP id d3so1526818lah.26 for ; Thu, 02 Feb 2012 09:27:01 -0800 (PST) Received: by 10.112.40.200 with SMTP id z8mr994969lbk.93.1328203621673; Thu, 02 Feb 2012 09:27:01 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi. [84.248.80.253]) by mx.google.com with ESMTPS id xz3sm2498907lab.7.2012.02.02.09.26.59 (version=SSLv3 cipher=OTHER); Thu, 02 Feb 2012 09:27:00 -0800 (PST) From: Jani Nikula To: Simon Campese , notmuch@notmuchmail.org Subject: Re: Set "From" based on "To" when replying In-Reply-To: <87obtx5as1.fsf@tu-dortmund.de> References: <87obtx5as1.fsf@tu-dortmund.de> User-Agent: Notmuch/0.11+139~g4340989 (http://notmuchmail.org) Emacs/23.3.1 (i686-pc-linux-gnu) Date: Thu, 02 Feb 2012 19:26:53 +0200 Message-ID: <87obthxi1u.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2012 17:27:04 -0000 On Sat, 21 Jan 2012 16:35:10 +0100, Simon Campese wrote: > 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? Do you have all those email addresses in the user.other_email configuration option in your ~/.notmuch-config? It should do the trick, though I can see that it might get a bit tedious if you use plenty of email addresses like above. BR, Jani.