From: David K}gedal <davidk@lysator.liu.se>
Subject: Handling Resent-CC and -BCC in sendmail.el
Date: Fri, 8 Dec 1995 22:51:29 +0100 [thread overview]
Message-ID: <199512082151.WAA22197@tina.lysator.liu.se> (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
next reply other threads:[~1995-12-08 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-08 21:51 David K}gedal [this message]
1995-12-08 23:48 ` Sten Drescher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199512082151.WAA22197@tina.lysator.liu.se \
--to=davidk@lysator.liu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).