1 Return-Path: <m.walters@qmul.ac.uk>
\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 29C69431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 25 Mar 2012 05:22:21 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
\r
12 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
\r
13 NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 0Wd3idEp3Hq1 for <notmuch@notmuchmail.org>;
\r
17 Sun, 25 Mar 2012 05:22:20 -0700 (PDT)
\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 35CA0431FAE
\r
22 for <notmuch@notmuchmail.org>; Sun, 25 Mar 2012 05:22:20 -0700 (PDT)
\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])
\r
24 by mail2.qmul.ac.uk with esmtp (Exim 4.71)
\r
25 (envelope-from <m.walters@qmul.ac.uk>)
\r
26 id 1SBmSa-0000P1-3G; Sun, 25 Mar 2012 13:22:16 +0100
\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]
\r
29 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)
\r
30 (envelope-from <m.walters@qmul.ac.uk>)
\r
31 id 1SBmSZ-0002Vv-M4; Sun, 25 Mar 2012 13:22:11 +0100
\r
32 From: Mark Walters <markwalters1009@gmail.com>
\r
33 To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch@notmuchmail.org
\r
34 Subject: Re: [BUG/PATCH 2/2] emacs: Fix replying from alternate addresses
\r
35 In-Reply-To: <1332635232-15269-3-git-send-email-awg+notmuch@xvx.ca>
\r
36 References: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca>
\r
37 <1332635232-15269-3-git-send-email-awg+notmuch@xvx.ca>User-Agent:
\r
38 Notmuch/0.12+65~g8bf1842 (http://notmuchmail.org) Emacs/23.3.1
\r
39 (x86_64-pc-linux-gnu)
\r
40 Date: Sun, 25 Mar 2012 13:22:24 +0100
\r
41 Message-ID: <878vio50qn.fsf@qmul.ac.uk>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-Sender-Host-Address: 94.192.233.223
\r
45 X-QM-SPAM-Info: Sender has good ham record. :)
\r
46 X-QM-Body-MD5: d1215d7abb7f688dbb3968b66ae41d5e (of first 20000 bytes)
\r
47 X-SpamAssassin-Score: -1.8
\r
48 X-SpamAssassin-SpamBar: -
\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
51 spam. We require at least 5.0 points to mark a message as spam.
\r
52 This message scored -1.8 points.
\r
53 Summary of the scoring:
\r
54 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,
\r
56 * [138.37.6.40 listed in list.dnswl.org]
\r
57 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
58 provider * (markwalters1009[at]gmail.com)
\r
59 * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
\r
61 * 0.5 AWL AWL: From: address is in the auto white-list
\r
62 X-QM-Scan-Virus: ClamAV says the message is clean
\r
63 X-BeenThere: notmuch@notmuchmail.org
\r
64 X-Mailman-Version: 2.1.13
\r
66 List-Id: "Use and development of the notmuch mail system."
\r
67 <notmuch.notmuchmail.org>
\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
71 List-Post: <mailto:notmuch@notmuchmail.org>
\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
75 X-List-Received-Date: Sun, 25 Mar 2012 12:22:21 -0000
\r
77 Adam Wolfe Gordon <awg+notmuch@xvx.ca> writes:
\r
78 > The bug was that notmuch-mua-mail used `mail-header` to check whether
\r
79 > it was passed a "From" header. The implementation of `mail-header`
\r
80 > must try to compare symbols instead of strings when looking for
\r
81 > headers, as it was returning nil when a From header was present. This
\r
82 > is probably because the mail functions construct headers as alists
\r
83 > with symbols for the header names, while our code uses strings for the
\r
86 > Since we don't use `mail-header` anywhere else, and `message-mail` is
\r
87 > perfectly happy to accept string header names, the fix is just to use
\r
88 > `assoc` to look for the From header, so that the strings get compared
\r
91 I can confirm that everything works as expected with this fix.
\r
97 > emacs/notmuch-mua.el | 4 ++--
\r
99 > 2 files changed, 2 insertions(+), 3 deletions(-)
\r
101 > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
102 > index 6aae3a0..9805d79 100644
\r
103 > --- a/emacs/notmuch-mua.el
\r
104 > +++ b/emacs/notmuch-mua.el
\r
105 > @@ -187,7 +187,7 @@ OTHER-ARGS are passed through to `message-mail'."
\r
106 > (when (not (string= "" user-agent))
\r
107 > (push (cons "User-Agent" user-agent) other-headers))))
\r
109 > - (unless (mail-header 'From other-headers)
\r
110 > + (unless (assoc "From" other-headers)
\r
111 > (push (cons "From" (concat
\r
112 > (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
\r
114 > @@ -250,7 +250,7 @@ the From: address first."
\r
115 > (interactive "P")
\r
116 > (let ((other-headers
\r
117 > (when (or prompt-for-sender notmuch-always-prompt-for-sender)
\r
118 > - (list (cons 'From (notmuch-mua-prompt-for-sender))))))
\r
119 > + (list (cons "From" (notmuch-mua-prompt-for-sender))))))
\r
120 > (notmuch-mua-mail nil nil other-headers)))
\r
122 > (defun notmuch-mua-new-forward-message (&optional prompt-for-sender)
\r
123 > diff --git a/test/emacs b/test/emacs
\r
124 > index fa5d706..08db1ee 100755
\r
127 > @@ -275,7 +275,6 @@ EOF
\r
128 > test_expect_equal_file OUTPUT EXPECTED
\r
130 > test_begin_subtest "Reply from alternate address within emacs"
\r
131 > -test_subtest_known_broken
\r
132 > add_message '[from]="Sender <sender@example.com>"' \
\r
133 > [to]=test_suite_other@notmuchmail.org \
\r
134 > [subject]=notmuch-reply-test \
\r
138 > _______________________________________________
\r
139 > notmuch mailing list
\r
140 > notmuch@notmuchmail.org
\r
141 > http://notmuchmail.org/mailman/listinfo/notmuch
\r