Gnus development mailing list
 help / color / mirror / Atom feed
* Handling Resent-CC and -BCC in sendmail.el
@ 1995-12-08 21:51 David K}gedal
  1995-12-08 23:48 ` Sten Drescher
  0 siblings, 1 reply; 2+ messages in thread
From: David K}gedal @ 1995-12-08 21:51 UTC (permalink / raw)


In GNU Emacs 19.30.1 (sparc-sun-solaris2.4, X toolkit) of Tue Nov 28 1995 on tiny
configured using `configure  --prefix=/usr/gnu --with-x-toolkit'

When sending mail containing a "Resent-To: foobar" header, the
function sendmail-send-it sees that this is a forwarded mail, and
makes sure that sendmail is not called with -t, but instead finds the
addresses in the "Resent-To:" header and gives them to sendmail.

But it doesn't do anything with Resent-CC or Resent-BCC headers. They
are equally valid headers, although maybe less likely to appear. But
anyway, here is a patch that handles these cases, including removal of
any Resent-BCC headers before actual sending. I believe recent
versions of sendmail can take care of the last bit itself, but many
versions don't.

First a changelog entry

Fri Dec  8 22:44:15 1995  David K}gedal  <davidk@lysator.liu.se>

	* sendmail.el (sendmail-send-it): Added support for Resent-CC and
	Resent-BCC headers.

*** /usr/gnu/share/emacs/19.30/lisp/sendmail.el	Fri Nov 10 18:23:39 1995
--- sendmail.el	Fri Dec  8 22:40:37 1995
***************
*** 493,499 ****
  	    (replace-match "\n"))
  	  (let ((case-fold-search t))
  	    (goto-char (point-min))
! 	    (while (re-search-forward "^Resent-to:" delimline t)
  	      (setq resend-to-addresses
  		    (save-restriction
  		      (narrow-to-region (point)
--- 493,499 ----
  	    (replace-match "\n"))
  	  (let ((case-fold-search t))
  	    (goto-char (point-min))
! 	    (while (re-search-forward "^Resent-\\(to\\|cc\\|bcc\\):" delimline t)
  	      (setq resend-to-addresses
  		    (save-restriction
  		      (narrow-to-region (point)
***************
*** 501,507 ****
  					  (end-of-line)
  					  (point)))
  		      (append (mail-parse-comma-list)
! 			      resend-to-addresses))))
  ;;; Apparently this causes a duplicate Sender.
  ;;;	    ;; If the From is different than current user, insert Sender.
  ;;;	    (goto-char (point-min))
--- 501,512 ----
  					  (end-of-line)
  					  (point)))
  		      (append (mail-parse-comma-list)
! 			      resend-to-addresses)))
! 	      ;; Delete Resent-BCC ourselves
! 	      (if (save-excursion (beginning-of-line)
! 				  (looking-at "resent-bcc"))
! 		  (delete-region (save-excursion (beginning-of-line) (point))
! 				 (save-excursion (end-of-line) (1+ (point))))))
  ;;; Apparently this causes a duplicate Sender.
  ;;;	    ;; If the From is different than current user, insert Sender.
  ;;;	    (goto-char (point-min))


-- 
David Kågedal     Lysator Academic Computer Society       davidk@lysator.liu.se
http://www.lysator.liu.se/~davidk/                              +46-13 17 65 89


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

end of thread, other threads:[~1995-12-08 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-12-08 21:51 Handling Resent-CC and -BCC in sendmail.el David K}gedal
1995-12-08 23:48 ` Sten Drescher

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 NNTP newsgroup(s).