From 9f8b06c3709c1173a160c59b2aaeef7ec12f2463 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 4 Feb 2012 17:09:08 +0000 Subject: [PATCH] [PATCH 0/2] Control guessing of the from-address when replying --- 3e/83763c121837e79cd83d9ca6d3f352b1624ab6 | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 3e/83763c121837e79cd83d9ca6d3f352b1624ab6 diff --git a/3e/83763c121837e79cd83d9ca6d3f352b1624ab6 b/3e/83763c121837e79cd83d9ca6d3f352b1624ab6 new file mode 100644 index 000000000..574f17ca6 --- /dev/null +++ b/3e/83763c121837e79cd83d9ca6d3f352b1624ab6 @@ -0,0 +1,90 @@ +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 12ED2431FB6 + for ; Sat, 4 Feb 2012 09:08:21 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + 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 Qv5AtYHPUNjU for ; + Sat, 4 Feb 2012 09:08:20 -0800 (PST) +Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com + [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 7979C431FAF + for ; Sat, 4 Feb 2012 09:08:20 -0800 (PST) +Received: by wibhi8 with SMTP id hi8so3640758wib.26 + for ; Sat, 04 Feb 2012 09:08:19 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=from:to:subject:date:message-id:x-mailer; + bh=TM847ByFl5GDXmtVQ5VRRfjQAl02x6eTmSco5VmJ8J4=; + b=vUlu61m6HZjsQx5D3G1myN0Z7taAElZomimIDdj6UM007CUeYK5uIaF0zUUcYHPg2I + e/u5WSvRDJMFPXe2ul2N6yt6beKZG5gBV4h35OxP6eorDWQB/4EiuRZFHx1ugZjoJcAi + r2zkCb6foE2Q7Db3Zlj1bvYdR7WHSuMP+n058= +Received: by 10.180.109.77 with SMTP id hq13mr3815057wib.7.1328375299510; + Sat, 04 Feb 2012 09:08:19 -0800 (PST) +Received: from localhost (94-192-233-223.zone6.bethere.co.uk. + [94.192.233.223]) by mx.google.com with ESMTPS id + dw7sm13959954wib.4.2012.02.04.09.08.17 (version=TLSv1/SSLv3 cipher=OTHER); + Sat, 04 Feb 2012 09:08:18 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 0/2] Control guessing of the from-address when replying +Date: Sat, 4 Feb 2012 17:09:08 +0000 +Message-Id: <1328375350-10352-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.2.3 +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: Sat, 04 Feb 2012 17:08:21 -0000 + + +Hello + +This patch sets is intended to allow the user more control over the +From: address when replying to emails. + +In notmuch-reply.c the current logic for the From: address looks as +the main headers, then at the delivery headers, and finally defaults +to the config file address. This means that the frontends (e.g. emacs) +cannot tell whether the users primary address is in the From: header +because the message being replied to was sent to that address, or +notmuch just fellback to using it as it had no better guess. + +The first patch allows the user to control which fallbacks are +used. The second implements this in emacs so that it does not fallback +to the primary address; thus, in this case, emacs can ask for the +address (if notmuch-always-prompt-for-sender is set). The set is not +heavily tested but appears to work. + +There is some bikeshedding available as to what options we should be +able to pass to the --from= in notmuch-reply.c. + +It obviously also needs some tests and some man pages updates. + +Finally, we may want a defcustom option for emacs to control which it +uses (e.g., the user always wants to reply from ther primary address). + + +Best wishes + +Mark + + -- 2.26.2