emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master da0d598190: Don't use the original sender's address as the envelo


From: Lars Ingebrigtsen
Subject: master da0d598190: Don't use the original sender's address as the envelope-from
Date: Thu, 17 Mar 2022 06:57:55 -0400 (EDT)

branch: master
commit da0d598190c3337c4acb2adb7435b756c655af87
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 (bug#54429).
---
 lisp/gnus/message.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 2e9242d3e1..30734b8f1a 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -50,6 +50,7 @@
 (require 'subr-x)
 (require 'yank-media)
 (require 'mailcap)
+(require 'sendmail)
 
 (autoload 'mailclient-send-it "mailclient")
 
@@ -8016,7 +8017,18 @@ is for the internal use."
            (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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]