GNU bug report logs -
#43386
27.1; Regression in `report-emacs-bug'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 13 Sep 2020 21:31:02 UTC
Severity: normal
Tags: fixed, notabug
Found in version 27.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #30 received at 43386 <at> debbugs.gnu.org (full text, mbox):
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Mon, 14 Sep 2020 02:18:23 +0200
> Cc: 43386 <at> debbugs.gnu.org
>
> > In any case, in Emacs 26.3 (and prior), even
> > though the From has that crazy text, when I use
> > C-c C-c and tell Emacs to use my mail client,
> > the mail client window pops up perfectly, and
> > yes, my mail client knows what my email address
> > is. The buffer *sent mail to bug-gnu-emacs <at> gnu.org*
> > still has the crazy From text, but Emacs doesn't
> > bother me.
>
> Emacs now requires that the From address is valid, as you've
> discovered. (Sending bug reports from an "emacs -Q" is a pretty strange
> choice anyway, but that's up to you.)
>
> Things seem to be working as designed, so I'm closing this bug report.
I think Drew is right here: we have a bug on our hands.
Look at the code:
;; Query the user for the SMTP method, so that we can skip
;; questions about From header validity if the user is going to
;; use mailclient, anyway.
(when (or (and (derived-mode-p 'message-mode)
(eq message-send-mail-function 'sendmail-query-once))
(and (not (derived-mode-p 'message-mode))
(eq send-mail-function 'sendmail-query-once)))
(sendmail-query-user-about-smtp)
(when (derived-mode-p 'message-mode)
(setq message-send-mail-function (message-default-send-mail-function))))
(or report-emacs-bug-no-confirmation
;; mailclient.el does not need a valid From
(if (derived-mode-p 'message-mode)
(eq message-send-mail-function 'message-send-mail-with-mailclient)
(eq send-mail-function 'mailclient-send-it))
;; Not narrowing to the headers, but that's OK.
(let ((from (mail-fetch-field "From")))
(when (and (or (not from)
(message-bogus-recipient-p from)
;; This is the default user-mail-address. On
;; today's systems, it seems more likely to
;; be wrong than right, since most people
;; don't run their own mail server.
(string-match (format "\\<%s@%s\\>"
(regexp-quote (user-login-name))
(regexp-quote (system-name)))
from))
(not (yes-or-no-p
(format-message "Is `%s' really your email address? "
from))))
As you see, we _know_ that mailclient.el doesn't care about the faux
From address, and we have some logic to detect when this is the case.
But that logic doesn't work, because the conditions fail to match:
(when (or (and (derived-mode-p 'message-mode)
(eq message-send-mail-function 'sendmail-query-once))
(and (not (derived-mode-p 'message-mode))
(eq send-mail-function 'sendmail-query-once)))
(sendmail-query-user-about-smtp)
(when (derived-mode-p 'message-mode)
(setq message-send-mail-function (message-default-send-mail-function))))
The call to sendmail-query-user-about-smtp is the one that asks about
how to send, and allows to select mailclient. But the conditions to
call it are false, and the rest is history.
I think this breakage is somehow related to our attempt to clean up
the sendmail.el/message.el mess. So I suggest to look at how things
are supposed to work when message-mode is used by default, and see why
we miss the question about mailclient before asking about the From
address.
This bug report was last modified 4 years and 302 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.