unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54429: 29.0.50; message-resend should not use the original sender's address for the envelope-from
@ 2022-03-16 20:23 Sean Whitton
  2022-03-17 10:57 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Whitton @ 2022-03-16 20:23 UTC (permalink / raw)
  To: 54429

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

If `message-sendmail-envelope-from' is `header' then the envelope-from
will be the original sender's address, not the resender's.  But when
resending, the envelope-from should be the resender's address.  Defuse
that particular case.

-- 
Sean Whitton

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Don-t-use-the-original-sender-s-address-as-the-envel.patch --]
[-- Type: text/x-patch, Size: 1578 bytes --]

From 03abba1ccdc8604ff7e59ab8b4c55d18185d0fd1 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Wed, 16 Mar 2022 13:19:57 -0700
Subject: [PATCH] Don't use the original sender's address as the envelope-from

* lisp/gnus/message.el (message-resend): Avoid setting the
envelope-from to the original sender's address rather than the
resender's.
---
 lisp/gnus/message.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 800c7dcea0..ad04a5e865 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8016,7 +8016,18 @@ message-resend
 	    (select-safe-coding-system-function nil)
 	    message-required-mail-headers
 	    message-generate-hashcash
-	    rfc2047-encode-encoded-words)
+	    rfc2047-encode-encoded-words
+            ;; If `message-sendmail-envelope-from' is `header' then
+            ;; the envelope-from will be the original sender's
+            ;; address, not the resender's.  But when resending, the
+            ;; envelope-from should be the resender's address.  Defuse
+            ;; that particular case.
+            (message-sendmail-envelope-from
+              (and (not (and (eq message-sendmail-envelope-from
+                                 'obey-mail-envelope-from)
+                             (eq mail-envelope-from 'header)))
+                   (not (eq message-sendmail-envelope-from 'header))
+                   message-sendmail-envelope-from)))
 	(message-send-mail))
       (when gcc
 	(message-goto-eoh)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#54429: 29.0.50; message-resend should not use the original sender's address for the envelope-from
  2022-03-16 20:23 bug#54429: 29.0.50; message-resend should not use the original sender's address for the envelope-from Sean Whitton
@ 2022-03-17 10:57 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-17 10:57 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 54429

Sean Whitton <spwhitton@spwhitton.name> writes:

> If `message-sendmail-envelope-from' is `header' then the envelope-from
> will be the original sender's address, not the resender's.  But when
> resending, the envelope-from should be the resender's address.  Defuse
> that particular case.

Thanks; pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-17 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 20:23 bug#54429: 29.0.50; message-resend should not use the original sender's address for the envelope-from Sean Whitton
2022-03-17 10:57 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).