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 4B304429E25 for ; Thu, 8 Dec 2011 13:53:11 -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 b75SsWvGul7G for ; Thu, 8 Dec 2011 13:53:10 -0800 (PST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by olra.theworths.org (Postfix) with ESMTP id AE2CF431FD0 for ; Thu, 8 Dec 2011 13:53:10 -0800 (PST) Received: from [120.136.5.22] (helo=narsil) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RYltt-00039G-Al for notmuch@notmuchmail.org; Thu, 08 Dec 2011 21:53:09 +0000 Received: by narsil (Postfix, from userid 1000) id DE40852054C; Fri, 9 Dec 2011 10:53:04 +1300 (NZDT) From: Michael Hudson-Doyle To: notmuch@notmuchmail.org Subject: notmuch reply From:-guessing heuristics User-Agent: Notmuch/0.10.1 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Fri, 09 Dec 2011 10:53:04 +1300 Message-ID: <8762hq7mtb.fsf@canonical.com> 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, 08 Dec 2011 21:53:11 -0000 Hi all, I have a specific example where "notmuch reply" does not set a useful from: header. The set is: 1) I have a google apps-for-your-domain address, michael.hudson@linaro.org 2) There is a group/alias, validation@linaro.org that only accepts mail from members 3) michael.hudson@linaro.org forwards to michael.hudson@canonical.com, from where I get email with offlineimap. 4) michael.hudson@linaro.org and michael.hudson@canonical.com are both configured as addresses in ~/.notmuch-config with the linaro.org address being primary. When I reply to a mail to validation@linaro.org, the guessed address is michael.hudson@canonical.com and unless I change it, the reply bounces, which is obviously a bit annoying. Looking at the headers (and the notmuch source), michael.hudson@canonical.com seems to be being found in the Received headers. michael.hudson@linaro.org is not in any Received header, which is a bit strange, but in any case I think the code would find michael.hudson@canonical.com first (would it perhaps make more sense to search backwards through received? An earlier header is probably closer to what was intended, in some sense). michael.hudson@linaro.org does appear in a Delivered-To: header, so maybe those could be considered (it seems that some MTAs add a Delivered-To header from the envelope address, so it would have some legitimacy)? It would work in this case, but only because the Delivered-To that the canonical.com MTA adds is an internal address that's not configured as an address for me in notmuch... Alternatively, *I* wouldn't mind if notmuch stopped trying at all hard, and just used the primary address if there was nothing matching in to:/cc: but I guess that wouldn't work on mailing lists at all... Hm, I guess I've argued myself around to thinking that considering Delivered-To as a source of potential from addresses would be an improvement. What do you guys think? Cheers, mwh