GNU bug report logs -
#20133
24.4; message-mode signs mails multiple times for FCC
Previous Next
Reported by: Moritz Ulrich <moritz <at> tarn-vedra.de>
Date: Wed, 18 Mar 2015 11:42:01 UTC
Severity: normal
Tags: fixed
Found in version 24.4
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20133 in the body.
You can then email your comments to 20133 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20133
; Package
emacs
.
(Wed, 18 Mar 2015 11:42:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Moritz Ulrich <moritz <at> tarn-vedra.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 18 Mar 2015 11:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
This isn't problematic when using gpg-agent & caching of
passphrases, very annoying when not.
A failure when typing the passphrase a second time results in message
failing to store a local copy of the mail, even when the mail was sent
successfully. This can be confusing.
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?
If not, I suggest adding a variable to prevent signing from happening
when storing the mail locally.
In GNU Emacs 24.4.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.25)
of 2015-02-20 on localhost
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
Configured using:
`configure --disable-dependency-tracking
--prefix=/nix/store/ji06y4haijly0i0knmr986l2dajffv1p-emacs-24.4
--with-x-toolkit=gtk --with-xft'
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Message
Minor modes in effect:
mml-mode: t
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
auto-fill-function: message-do-auto-fill
transient-mark-mode: t
abbrev-mode: t
Recent input:
C-x m m o r i t z @ t r <backspace> a r n - v e d r
a . d e C-j C-/ C-n t e s t C-j F C C : S-SPC / h o
m e / m o r i t z / <M-backspace> <M-backspace> t m
p / C-n C-n C-e C-j C-j M-x m m l <XF86Tools> - <tab>
<tab> s e <tab> e <tab> <M-backspace> <tab> i <backspace>
s i <tab> <tab> - p g <tab> m <tab> <return> C-/ M-x
m m <tab> l - s e <tab> <M-backspace> m e <tab> <tab>
<M-backspace> s <tab> m <tab> <tab> s i <tab> - <tab>
m <backspace> p <backspace> p g p m <tab> <return>
C-c C-c t r <tab> <return> M-x C-g M-x r e p o r t
a <backspace> - e m <tab> <return>
Recent messages:
Undo!
Making completion list... [3 times]
You can run the command `mml-secure-message-sign-pgpmime' with C-c RET s p
Mark set
Sending...
Mark set [2 times]
Sending via mail...
Setting `send-mail-function' temporarily since "emacs -q" would overwrite customizations
Mark set
mail-file-babyl-p: not a regular file: /tmp/
Quit
Load-path shadows:
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/ji06y4haijly0i0knmr986l2dajffv1p-emacs-24.4/share/emacs/site-lisp/site-start
Features:
(shadow emacsbug mailalias cus-edit cus-start cus-load sendmail epg gnus
gnus-ems nnheader wid-edit cl-loaddefs cl-lib mml2015 epg-config
password-cache mail-extr sort help-mode gnus-util message format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr
mailabbrev mail-utils gmm-utils mailheader time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 108724 11604)
(symbols 48 20876 0)
(miscs 40 111 160)
(strings 32 17949 4123)
(string-bytes 1 517079)
(vectors 16 12380)
(vector-slots 8 415807 7630)
(floats 8 81 276)
(intervals 56 381 20)
(buffers 960 17)
(heap 1024 29049 684))
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#20133
; Package
emacs,gnus
.
(Wed, 20 Jan 2016 04:13:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#20133
; Package
emacs,gnus
.
(Wed, 20 Jan 2016 04:13:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#20133
; Package
emacs,gnus
.
(Mon, 23 Sep 2019 09:48:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 20133 <at> debbugs.gnu.org (full text, mbox):
Moritz Ulrich <moritz <at> tarn-vedra.de> writes:
> 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.
This should now be fixed in Emacs 27.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 23 Sep 2019 09:48:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
20133 <at> debbugs.gnu.org and Moritz Ulrich <moritz <at> tarn-vedra.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 23 Sep 2019 09:48:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 21 Oct 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.