From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Kahn Gillmor Newsgroups: gmane.emacs.bugs Subject: bug#20133: bug #20133: emacs 24.4; message-mode signs mails multiple times for FCC Date: Tue, 19 Jan 2016 23:11:55 -0500 Message-ID: <87bn8g7uus.fsf@alice.fifthhorseman.net> References: <87wq2elehd.fsf@moritz-x230.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1453263203 9280 80.91.229.3 (20 Jan 2016 04:13:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jan 2016 04:13:23 +0000 (UTC) To: Moritz Ulrich , 20133@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 20 05:13:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLk8v-0008B3-6F for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jan 2016 05:13:13 +0100 Original-Received: from localhost ([::1]:40072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLk8u-0003hB-6h for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Jan 2016 23:13:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLk8p-0003gZ-1s for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2016 23:13:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLk8k-00015e-U2 for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2016 23:13:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLk8k-00015Z-QX for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2016 23:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aLk8k-0005Cb-2v; Tue, 19 Jan 2016 23:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Kahn Gillmor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 20 Jan 2016 04:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20133 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by 20133-submit@debbugs.gnu.org id=B20133.145326312419910 (code B ref 20133); Wed, 20 Jan 2016 04:13:02 +0000 Original-Received: (at 20133) by debbugs.gnu.org; 20 Jan 2016 04:12:04 +0000 Original-Received: from localhost ([127.0.0.1]:54254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLk7n-0005B4-N2 for submit@debbugs.gnu.org; Tue, 19 Jan 2016 23:12:03 -0500 Original-Received: from che.mayfirst.org ([209.234.253.108]:51988) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLk7m-0005Av-Cq for 20133@debbugs.gnu.org; Tue, 19 Jan 2016 23:12:02 -0500 Original-Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id 38BEAF984; Tue, 19 Jan 2016 23:12:00 -0500 (EST) Original-Received: by fifthhorseman.net (Postfix, from userid 1000) id 4A6A120085; Tue, 19 Jan 2016 20:11:59 -0800 (PST) In-Reply-To: <87wq2elehd.fsf@moritz-x230.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Notmuch/0.21+68~g28d25e7 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111785 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed 2015-03-18 07:41:34 -0400, on https://debbugs.gnu.org/20133, Moritz = Ulrich wrote: > When sending signed emails with `mml-secure-message-sign-pgpmime', GnuPG > is called once for the outgoing mail, then again for every FCC: header > field. I can confirm this for emacs 24.5 as well as the original report's 24.4. > This isn't problematic when using gpg-agent & caching of > passphrases, very annoying when not. It's also problematic when using a smartcard, or when using ignore-cache-for-signing in ~/.gnupg/gpg-agent. Even when not using signatures and just encrypting, it's a bad situation because the body of the message stored in fcc is different from the body of the message sent into the SMTP network. This is also a concern if you have options set like message-generate-hashcash, because then the hashcash information sent via mail doesn't get copied into the fcc. Similarly, users with message-send-mail-partially-limit will see the whole message in Fcc, and won't be able to tell that it was split upon sending. I also find this troubling because the documentation explicitly contemplates the use of message-mode's encryption and signing with Fcc without acknowledging this flaw: https://www.gnu.org/software/emacs/manual/html_node/mh-e/Sending-PGP.html > The issue tracks down to message.el:5411 where > `message-encode-message-body' is called in a loop for every FCC. > > I'm not sure why it's necessary to re-encode the message once for every > FCC. Isn't it possible to just store the original outgoing mail? I think this is the right default -- though i think it won't work for users who have set message-fcc-externalize-attachments to non-nil. The raw message created and sent via message-send, which might itself operate multiple times, since message-send-alist by default is: ((news message-news-p message-send-via-news) (mail message-mail-p message-send-via-mail)) message-news-p and message-mail-p are defined to be mutually-exclusive, but i don't think the code in message-send would require them to be. And neither one of them returns or sets aside a buffer with the message to be stored either. Perhaps fcc would be better implemented as some sort of hook in message-send-mail-hook or message-send-hook or message-sent-hook instead? Is there a way to get this buffer? My elisp is not good enough to produce a patch without breaking things that other people might rely on if i try it by myself. But if someone wants to give me pointers for where to start i can try to produce something useful. > If not, I suggest adding a variable to prevent signing from happening > when storing the mail locally.=20 I don't think this approach would be the right approach. The user should know whether a given mail was sent out signed or not. The user should also be able to expect that the octets in the fcc'ed body are the same bytes that were sent to the network. Please Cc me on followups to 20133, it's not clear how i should subscribe to this installation of debbugs. Regards, --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJWnwkLXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFREIyRTc0RjU2RkNGMkI2NzI5N0I3MzUy NEVDRkY1QUZGNjgzNzBBAAoJECTs/1r/aDcKRXcQAI60oemGFUXV/AO3q1FXkTvJ uAPa5g27dNP4/oHwVjMXarmjkx8TU3fY4JKFtMVvRvDpUMeCEtDvRoG+EpbXPUGE RvLTt2e4jNOprlzNt0xRryKadXPwX2TGk/0W2bTY6vzGWdeZNgoKmOW8pYDHbE3c 42UCjmjV9wU6weWaiv6nZbcltPu6MjqPEu4lPsvB4VEEGen/Epc7oXuF/uzZPDLg Gt+w4Q8wod/QdOQqq1k/jMpHzGxNPeJRtAu/V2SyrJ6Az1L2atvG9z1uOJdoiVsu BAv3qDyreZOts4AHBK41h0ztsRn4pRWGDGeWI0/LDZHmUyxSl+VFgzZ2OEChMu66 4usQwbX+k++Mpz41Lv1Tn8IdoCGt5eYhcJXZ8hm3OR7qQmndFmsM4fmZzAvCPJdD o+cvsB9hJ7OxZQDDxNw2wDFDm9Dm2EpdWRJU0CUvP+n+SFE00KrHiVrE/iZ/6f7q oJjb1FuLdtIe3EGStv90LD9/W0KYUWLyiWaQUu8HGf9VWTsRMJUOY+ftLvkoK9iL 61afGaLLnLX85t1AJSnSLVqI3YDqldknBJQy7D1JDRrQj43Labotk++3THdpB0sR zTnAaZNDoHZAwC285SexqlWKdAUFB74cZF6cYBIpkeI9Hd241rIvAo6GnPmGkpv2 xSOLTmwNb7E9NQ3Fm4L5 =2okp -----END PGP SIGNATURE----- --=-=-=--