From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43386: 27.1; Regression in `report-emacs-bug' Date: Mon, 14 Sep 2020 17:58:27 +0300 Message-ID: <831rj4be24.fsf@gnu.org> References: <9713a95e-00f8-401c-be0f-3d54ad32ee55@default> <874ko1fejh.fsf@gnus.org> <846c2fb0-2b87-4073-a30f-e3eb61217909@default> <878sdddyba.fsf@gnus.org> <6abf2cf3-8105-4f8c-be98-dcbe5fd854f3@default> <874ko1dxdc.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32545"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43386@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 14 16:59:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHpwl-0008O2-J6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Sep 2020 16:59:11 +0200 Original-Received: from localhost ([::1]:54294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHpwk-0001jx-L8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Sep 2020 10:59:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHpwc-0001h9-Ow for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2020 10:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHpwc-0006X4-Ee for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2020 10:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kHpwc-0008Rw-Cl for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2020 10:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2020 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43386 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 43386-submit@debbugs.gnu.org id=B43386.160009551532445 (code B ref 43386); Mon, 14 Sep 2020 14:59:02 +0000 Original-Received: (at 43386) by debbugs.gnu.org; 14 Sep 2020 14:58:35 +0000 Original-Received: from localhost ([127.0.0.1]:55770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHpwA-0008RE-SJ for submit@debbugs.gnu.org; Mon, 14 Sep 2020 10:58:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHpw9-0008R0-Sz for 43386@debbugs.gnu.org; Mon, 14 Sep 2020 10:58:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53551) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHpw4-0006SW-FL; Mon, 14 Sep 2020 10:58:28 -0400 Original-Received: from [176.228.60.248] (port=2214 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kHpvz-0001KF-9N; Mon, 14 Sep 2020 10:58:27 -0400 In-Reply-To: <874ko1dxdc.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 14 Sep 2020 02:18:23 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188061 Archived-At: > From: Lars Ingebrigtsen > Date: Mon, 14 Sep 2020 02:18:23 +0200 > Cc: 43386@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@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.