aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-03-21 10:29:26 +0000
committerGerd Moellmann2001-03-21 10:29:26 +0000
commit180d5509171d16d6b8a74afa824d4318c57316c3 (patch)
treeefb5ac6c9fd8c365959a2affc076fb6fe917b007
parent7008ccaca15bf9a6558b9ffa87cf145d3d18a183 (diff)
downloademacs-180d5509171d16d6b8a74afa824d4318c57316c3.tar.gz
emacs-180d5509171d16d6b8a74afa824d4318c57316c3.zip
(sendmail-send-it): Don't parse Resent-*
headers. Always invoke sendmail with option -t.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/sendmail.el53
2 files changed, 33 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b3aaae58374..e0fa35fe339 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12001-03-21 Gerd Moellmann <gerd@gnu.org>
2
3 * mail/sendmail.el (sendmail-send-it): Don't parse Resent-*
4 headers. Always invoke sendmail with option -t.
5
12001-03-21 Paul Eggert <eggert@twinsun.com> 62001-03-21 Paul Eggert <eggert@twinsun.com>
2 7
3 * international/mule-cmds.el (set-locale-environment): Set 8 * international/mule-cmds.el (set-locale-environment): Set
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 8b011159d0b..39f641ea32d 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -795,7 +795,7 @@ external program defined by `sendmail-program'."
795 (coding (and (local-variable-p 'buffer-file-coding-system) 795 (coding (and (local-variable-p 'buffer-file-coding-system)
796 buffer-file-coding-system)) 796 buffer-file-coding-system))
797 selected-coding 797 selected-coding
798 resend-to-addresses 798;;; resend-to-addresses
799 delimline 799 delimline
800 fcc-was-found 800 fcc-was-found
801 (mailbuf (current-buffer))) 801 (mailbuf (current-buffer)))
@@ -823,23 +823,23 @@ external program defined by `sendmail-program'."
823 (replace-match "\n")) 823 (replace-match "\n"))
824 (goto-char (point-min)) 824 (goto-char (point-min))
825 (let ((case-fold-search t)) 825 (let ((case-fold-search t))
826 (goto-char (point-min)) 826;;; (goto-char (point-min))
827 (while (re-search-forward "^Resent-\\(to\\|cc\\|bcc\\):" delimline t) 827;;; (while (re-search-forward "^Resent-\\(to\\|cc\\|bcc\\):" delimline t)
828 (setq resend-to-addresses 828;;; (setq resend-to-addresses
829 (save-restriction 829;;; (save-restriction
830 (narrow-to-region (point) 830;;; (narrow-to-region (point)
831 (save-excursion 831;;; (save-excursion
832 (forward-line 1) 832;;; (forward-line 1)
833 (while (looking-at "^[ \t]") 833;;; (while (looking-at "^[ \t]")
834 (forward-line 1)) 834;;; (forward-line 1))
835 (point))) 835;;; (point)))
836 (append (mail-parse-comma-list) 836;;; (append (mail-parse-comma-list)
837 resend-to-addresses))) 837;;; resend-to-addresses)))
838 ;; Delete Resent-BCC ourselves 838;;; ;; Delete Resent-BCC ourselves
839 (if (save-excursion (beginning-of-line) 839;;; (if (save-excursion (beginning-of-line)
840 (looking-at "resent-bcc")) 840;;; (looking-at "resent-bcc"))
841 (delete-region (save-excursion (beginning-of-line) (point)) 841;;; (delete-region (save-excursion (beginning-of-line) (point))
842 (save-excursion (end-of-line) (1+ (point)))))) 842;;; (save-excursion (end-of-line) (1+ (point))))))
843;;; Apparently this causes a duplicate Sender. 843;;; Apparently this causes a duplicate Sender.
844;;; ;; If the From is different than current user, insert Sender. 844;;; ;; If the From is different than current user, insert Sender.
845;;; (goto-char (point-min)) 845;;; (goto-char (point-min))
@@ -980,13 +980,16 @@ external program defined by `sendmail-program'."
980 ;; These mean "report errors by mail" 980 ;; These mean "report errors by mail"
981 ;; and "deliver in background". 981 ;; and "deliver in background".
982 '("-oem" "-odb")) 982 '("-oem" "-odb"))
983 ;; Get the addresses from the message 983;;; ;; Get the addresses from the message
984 ;; unless this is a resend. 984;;; ;; unless this is a resend.
985 ;; We must not do that for a resend 985;;; ;; We must not do that for a resend
986 ;; because we would find the original addresses. 986;;; ;; because we would find the original addresses.
987 ;; For a resend, include the specific addresses. 987;;; ;; For a resend, include the specific addresses.
988 (or resend-to-addresses 988;;; (or resend-to-addresses
989 '("-t")))) 989 '("-t")
990;;; )
991 )
992 )
990 (exit-value (apply 'call-process-region args))) 993 (exit-value (apply 'call-process-region args)))
991 (or (null exit-value) (zerop exit-value) 994 (or (null exit-value) (zerop exit-value)
992 (error "Sending...failed with exit value %d" exit-value))) 995 (error "Sending...failed with exit value %d" exit-value)))