GNU bug report logs - #80052
31.0.50; message-get-reply-headers doesn't handle DKIM-rewritten From headers well

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Mon, 22 Dec 2025 13:38:02 UTC

Severity: normal

Found in version 31.0.50

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

To reply to this bug, email your comments to 80052 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to yamaoka <at> jpl.org, rpluim <at> gmail.com, eric <at> ericabrahamsen.net, bug-gnu-emacs <at> gnu.org:
bug#80052; Package emacs. (Mon, 22 Dec 2025 13:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to yamaoka <at> jpl.org, rpluim <at> gmail.com, eric <at> ericabrahamsen.net, bug-gnu-emacs <at> gnu.org. (Mon, 22 Dec 2025 13:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; message-get-reply-headers doesn't handle DKIM-rewritten
 From headers well
Date: Mon, 22 Dec 2025 13:37:04 +0000
X-debbugs-cc: yamaoka <at> jpl.org, rpluim <at> gmail.com, eric <at> ericabrahamsen.net

Here is a sample set of headers from our bug tracker:

> From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors"
>  <bug-gnu-emacs <at> gnu.org>
> To: Sean Whitton <spwhitton <at> spwhitton.name>, Eli Zaretskii <eliz <at> gnu.org>
> Cc: Madhu <enometh <at> meer.net>, 80017 <at> debbugs.gnu.org

I have bug-gnu-emacs <at> gnu.org in message-dont-reply-to-names because I
don't want to unintentionally file new bugs, and because there's no
point in replying to it, anyway.

Then message-get-reply-headers sets up these headers for a wide reply:

> To: Eli Zaretskii <eliz <at> gnu.org>
> Cc: martin rudalics <rudalics <at> gmx.at>,  Madhu <enometh <at> meer.net>,  80017 <at> debbugs.gnu.org

which is wrong, Martin should be in To:, and Eli in Cc:.

If I remove bug-gnus-emacs <at> gnu.org from message-dont-reply-to-names we
get this:

> To: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  Madhu <enometh <at> meer.net>,  80017 <at> debbugs.gnu.org,  martin rudalics <rudalics <at> gmx.at>

Which is not really correct either -- essentially the Reply-To, that's
meant to ensure the reply is sent to Martin's real address, not the fake
bug-gnu-emacs <at> gnu.org address for him, is overridden.

I think that this overriding is caused by this code, added by Katsumi
Yamaoka in commit 70678cd508e6:
--8<---------------cut here---------------start------------->8---
      ;; Make sure this message goes to the author if this is a wide
      ;; reply, since Reply-To address may be a list address a mailing
      ;; list server added.
      (when (and wide author)
	(setq cc (concat author ", " cc)))
      (when (or wide (not author))
	(setq author (or (message-fetch-field "from") "")))
--8<---------------cut here---------------end--------------->8---

Previously we had
--8<---------------cut here---------------start------------->8---
(setq author (or (message-fetch-field "mail-reply-to")
		 (message-fetch-field "reply-to")
		 (message-fetch-field "from")
		 "")
--8<---------------cut here---------------end--------------->8---

and that was it for author, and the effect was that Martin's real
address would have been the first entry in RECIPIENTS and so in the To:
field.  But now, when WIDE is non-nil, this code makes the From header
unconditionally take precedence over Reply-To.

Katsumi Yamaoka's code prioritises the case of a mailing list that puts
its own address in Reply-To, and essentially overrules that decision of
the mailing list administrator, and ensure that the list address appears
only in the Cc.  That's too simplistic, I think, and it leads to the
particular problem reported here.

So I would like to propose reverting commit 70678cd508e6.

-- 
Sean Whitton




Reply sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
You have taken responsibility. (Tue, 23 Dec 2025 01:19:02 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Tue, 23 Dec 2025 01:19:02 GMT) Full text and rfc822 format available.

Message #10 received at 80052-done <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: eric <at> ericabrahamsen.net, 80052-done <at> debbugs.gnu.org, rpluim <at> gmail.com
Subject: Re: bug#80052: 31.0.50; message-get-reply-headers doesn't handle
 DKIM-rewritten From headers well
Date: Tue, 23 Dec 2025 10:18:22 +0900
On Mon, 22 Dec 2025 13:37:04 +0000, Sean Whitton wrote:
> Katsumi Yamaoka's code prioritises the case of a mailing list that puts
> its own address in Reply-To, and essentially overrules that decision of
> the mailing list administrator, and ensure that the list address appears
> only in the Cc.  That's too simplistic, I think, and it leads to the
> particular problem reported here.

> So I would like to propose reverting commit 70678cd508e6.

I see the way to solve the problem that I met 13 years ago was
probably wrong.  So, I've reverted my commit 70678cd508e6.

Thank you.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#80052; Package emacs. (Tue, 23 Dec 2025 12:10:01 GMT) Full text and rfc822 format available.

Message #13 received at 80052 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: 80052 <at> debbugs.gnu.org, yamaoka <at> jpl.org
Subject: Re: bug#80052: 31.0.50; message-get-reply-headers doesn't handle
 DKIM-rewritten From headers well
Date: Tue, 23 Dec 2025 12:09:05 +0000
Hello,

On Tue 23 Dec 2025 at 10:18am +09, Katsumi Yamaoka wrote:

> On Mon, 22 Dec 2025 13:37:04 +0000, Sean Whitton wrote:
>> Katsumi Yamaoka's code prioritises the case of a mailing list that puts
>> its own address in Reply-To, and essentially overrules that decision of
>> the mailing list administrator, and ensure that the list address appears
>> only in the Cc.  That's too simplistic, I think, and it leads to the
>> particular problem reported here.
>
>> So I would like to propose reverting commit 70678cd508e6.
>
> I see the way to solve the problem that I met 13 years ago was
> probably wrong.  So, I've reverted my commit 70678cd508e6.
>
> Thank you.

Thank you for reviewing my bug report so quickly, Yamaoka-san!

-- 
Sean Whitton




This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.