Re: [PATCH v2 3/6] cli: add support for replying just to the sender in "notmuch reply"
authorMark Walters <markwalters1009@gmail.com>
Sun, 8 Jan 2012 23:23:15 +0000 (23:23 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:47 +0000 (09:41 -0800)
a6/6f8036910874695da94363636a4c8e9453d54a [new file with mode: 0644]

diff --git a/a6/6f8036910874695da94363636a4c8e9453d54a b/a6/6f8036910874695da94363636a4c8e9453d54a
new file mode 100644 (file)
index 0000000..0ee1937
--- /dev/null
@@ -0,0 +1,128 @@
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1056E4143A3\r
+       for <notmuch@notmuchmail.org>; Sun,  8 Jan 2012 15:23:22 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id OaO1ZIfvtn5w for <notmuch@notmuchmail.org>;\r
+       Sun,  8 Jan 2012 15:23:21 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 69CAE4143A1\r
+       for <notmuch@notmuchmail.org>; Sun,  8 Jan 2012 15:23:21 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1Rk256-0004IS-KP; Sun, 08 Jan 2012 23:23:17 +0000\r
+Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
+       helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1Rk256-00041r-An; Sun, 08 Jan 2012 23:23:16 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 3/6] cli: add support for replying just to the sender\r
+       in "notmuch reply"\r
+In-Reply-To:\r
+ <6e37e058190d7c06519de3e67569fbee0be45461.1326058946.git.jani@nikula.org>\r
+References: <cover.1326058946.git.jani@nikula.org>\r
+       <6e37e058190d7c06519de3e67569fbee0be45461.1326058946.git.jani@nikula.org>\r
+User-Agent: Notmuch/0.10.2+183~g99cd7be (http://notmuchmail.org) Emacs/23.3.1\r
+       (i486-pc-linux-gnu)\r
+Date: Sun, 08 Jan 2012 23:23:15 +0000\r
+Message-ID: <877h11eq3g.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 94.192.233.223\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: 2f85d17497675942f7020f78d15a5c6d (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.7\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -1.7 points.\r
+       Summary of the scoring: \r
+       * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+       *      medium trust\r
+       *      [138.37.6.40 listed in list.dnswl.org]\r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+       *      domain\r
+       *  0.6 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 08 Jan 2012 23:23:22 -0000\r
+\r
+\r
+I like this version (of the whole series) but have two queries. (Note I\r
+haven't actually tried it out yet: I have just been reading the code.)\r
+\r
+> +    /* Force recipient type in reply-to-sender mode just in case replying to\r
+> +     * user's own message finds recipients in Cc/Bcc fields only.\r
+> +     */\r
+> +    if (reply_all)\r
+> +        recipient_type = reply_to_map[i].recipient_type;\r
+> +    else\r
+> +        recipient_type = GMIME_RECIPIENT_TYPE_TO;\r
+> +\r
+> +    addr = add_recipients_for_string (reply, config, recipient_type,\r
+> +                                      recipients, add_recipients);\r
+> +\r
+\r
+Why force the recipient type?  I do not think notmuch should ever move\r
+bcc people onto a different header. I think that will bite someone when\r
+it leaks information.\r
+\r
+I would be happy with either empty headers or with the people staying\r
+as bcc.\r
+\r
+In the cc: case I have no preference (as those addresses are already\r
+public) but I would suggest being consistent with bcc so either empty\r
+headers or keep them in the cc line.\r
+\r
+>     for (messages = notmuch_query_search_messages (query);\r
+>         notmuch_messages_valid (messages);\r
+>         notmuch_messages_move_to_next (messages))\r
+>     {\r
+[...]\r
+>       (void)add_recipients_from_message (reply, config, message, reply_all);\r
+\r
+Since the above logic is applied to each email individually I think\r
+working out the recipients when replying to multiple emails (e.g.,\r
+reply-to-sender on a thread) could be very confusing. Some of the people\r
+being replied to will have been senders, some recipients (it is very\r
+likely that the thread contains messages we sent), some could even be\r
+cc, bcc people. Personally, I would have no idea what to expect from\r
+reply-to-sender in this case.\r
+\r
+(My personal choice would be not to allow notmuch-reply-to-sender if\r
+multiple messages are specified. But I can obtain that by unbinding "r"\r
+in the notmuch-search-mode-map keymap.)\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r