RE: [Spam-verdenking][english 100%] RE: Reply all - issue
[notmuch-archives.git] / a1 / d48298ac66e37a3695fa26f57fdb4d288ea1d4
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id D87DF431FAF\r
6         for <notmuch@notmuchmail.org>; Sun,  4 Mar 2012 00:25:45 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 7TBKAv37peMJ for <notmuch@notmuchmail.org>;\r
16         Sun,  4 Mar 2012 00:25:45 -0800 (PST)\r
17 Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
18         [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id EC042431FAE\r
21         for <notmuch@notmuchmail.org>; Sun,  4 Mar 2012 00:25:44 -0800 (PST)\r
22 Received: by lahc1 with SMTP id c1so3802307lah.26\r
23         for <notmuch@notmuchmail.org>; Sun, 04 Mar 2012 00:25:42 -0800 (PST)\r
24 Received-SPF: pass (google.com: domain of jani@nikula.org designates\r
25         10.112.44.225 as permitted sender) client-ip=10.112.44.225; \r
26 Authentication-Results: mr.google.com;\r
27         spf=pass (google.com: domain of jani@nikula.org\r
28         designates 10.112.44.225 as permitted sender)\r
29         smtp.mail=jani@nikula.org\r
30 Received: from mr.google.com ([10.112.44.225])\r
31         by 10.112.44.225 with SMTP id h1mr7629690lbm.34.1330849542073 (num_hops\r
32         = 1); Sun, 04 Mar 2012 00:25:42 -0800 (PST)\r
33 MIME-Version: 1.0\r
34 Received: by 10.112.44.225 with SMTP id h1mr6321557lbm.34.1330849541999;\r
35         Sun, 04 Mar 2012 00:25:41 -0800 (PST)\r
36 Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
37         [84.248.80.253])\r
38         by mx.google.com with ESMTPS id k4sm17000996lbw.10.2012.03.04.00.25.39\r
39         (version=SSLv3 cipher=OTHER); Sun, 04 Mar 2012 00:25:40 -0800 (PST)\r
40 From: Jani Nikula <jani@nikula.org>\r
41 To: notmuch@notmuchmail.org\r
42 Subject: [PATCH] emacs: fix MML quoting in replies\r
43 Date: Sun,  4 Mar 2012 10:25:38 +0200\r
44 Message-Id: <1330849538-24558-1-git-send-email-jani@nikula.org>\r
45 X-Mailer: git-send-email 1.7.5.4\r
46 In-Reply-To: <87fwdptbir.fsf@dehydrator.spatula.rdu.redhat.com>\r
47 References: <87fwdptbir.fsf@dehydrator.spatula.rdu.redhat.com>\r
48 X-Gm-Message-State:\r
49  ALoCoQlRL9vUDPWI+xdOiwaE6CDp+OiT4/v+jQ0+D/kETzO00E6yzRVsd7MXu2oLcX+45mCsmlmm\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sun, 04 Mar 2012 08:25:46 -0000\r
63 \r
64 The reply MML quoting added in commit ae438cc unintentionally MML\r
65 quotes also the signature/encryption MML tags added via\r
66 message-setup-hook, causing the reply not to be signed/encrypted.\r
67 \r
68 MML quote just the original message in the temp buffer before\r
69 inserting it to the message buffer, to not interfere with message mode\r
70 hooks or message construction in general.\r
71 \r
72 See [1] and [2] for bug reports.\r
73 \r
74 Thanks to Tim Bielawa <tbielawa@redhat.com> for testing.\r
75 \r
76 [1] id:"87hay78x6l.fsf@wyzanski.jamesvasile.com"\r
77 [2] id:"1330812262-28272-1-git-send-email-tbielawa@redhat.com".\r
78 \r
79 Signed-off-by: Jani Nikula <jani@nikula.org>\r
80 ---\r
81  emacs/notmuch-mua.el |   10 ++++------\r
82  1 files changed, 4 insertions(+), 6 deletions(-)\r
83 \r
84 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
85 index 4be7c13..13244eb 100644\r
86 --- a/emacs/notmuch-mua.el\r
87 +++ b/emacs/notmuch-mua.el\r
88 @@ -95,6 +95,9 @@ list."\r
89               (goto-char (point-min))\r
90               (setq headers (mail-header-extract)))))\r
91        (forward-line 1)\r
92 +      ;; Original message may contain (malicious) MML tags. We must\r
93 +      ;; properly quote them in the reply.\r
94 +      (mml-quote-region (point) (point-max))\r
95        (setq body (buffer-substring (point) (point-max))))\r
96      ;; If sender is non-nil, set the From: header to its value.\r
97      (when sender\r
98 @@ -116,12 +119,7 @@ list."\r
99      (push-mark))\r
100    (set-buffer-modified-p nil)\r
101  \r
102 -  (message-goto-body)\r
103 -  ;; Original message may contain (malicious) MML tags.  We must\r
104 -  ;; properly quote them in the reply.  Note that using `point-max'\r
105 -  ;; instead of `mark' here is wrong.  The buffer may include user's\r
106 -  ;; signature which should not be MML-quoted.\r
107 -  (mml-quote-region (point) (mark)))\r
108 +  (message-goto-body))\r
109  \r
110  (defun notmuch-mua-forward-message ()\r
111    (message-forward)\r
112 -- \r
113 1.7.5.4\r
114 \r