From: dreschs@mpd.tandem.com (Sten Drescher)
Subject: Re: Handling Resent-CC and -BCC in sendmail.el
Date: 08 Dec 1995 17:48:33 -0600 [thread overview]
Message-ID: <55pwdzf772.fsf@galil.austnsc.tandem.com> (raw)
In-Reply-To: David K}gedal's message of Fri, 8 Dec 1995 22:51:29 +0100
David Kågedal <davidk@lysator.liu.se> said:
DK> In GNU Emacs 19.30.1 (sparc-sun-solaris2.4, X toolkit) of Tue Nov 28
DK> 1995 on tiny configured using `configure --prefix=/usr/gnu
DK> --with-x-toolkit'
DK> When sending mail containing a "Resent-To: foobar" header, the
DK> function sendmail-send-it sees that this is a forwarded mail, and
DK> makes sure that sendmail is not called with -t, but instead finds
DK> the addresses in the "Resent-To:" header and gives them to sendmail.
DK> But it doesn't do anything with Resent-CC or Resent-BCC
DK> headers. They are equally valid headers, although maybe less likely
DK> to appear. But anyway, here is a patch that handles these cases,
DK> including removal of any Resent-BCC headers before actual sending. I
DK> believe recent versions of sendmail can take care of the last bit
DK> itself, but many versions don't.
As sendmail 8.7.1 (possibly earlier) can handle Resent-*
headers, here is an additional patch (combined with David Kågedal's)
which allows sendmail to handle the resending.
DK> First a changelog entry
Fri Dec 8 23:36:46 1995 Sten Drescher <dreschs@mpd.tandem.com>
* sendmail.el: Added sendmail-resends variable to indicate that
sendmail can handle Resent-* headers
* sendmail.el (sendmail-send-it): Checks sendmail-resends before
doing internal processing of Resent-* headers.
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/remote/share/emacs/19.30/lisp/sendmail.el Fri Nov 10 11:23:39 1995
--- sendmail.el Fri Dec 8 17:24:39 1995
***************
*** 61,67 ****
--- 61,73 ----
The headers should be delimited by a line whose contents
match the variable `mail-header-separator'.")
+ ;; Should be set in site-init.el
;;;###autoload
+ (defvar sendmail-resends nil "\
+ *If t, the sendmail-program will handle Resent messages.
+ Otherwise, the send-mail-function must.")
+
+ ;;;###autoload
(defvar mail-header-separator "--text follows this line--" "\
*Line used to separate headers from text in messages being composed.")
***************
*** 492,507 ****
(< (point) delimline))
(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)
! (save-excursion
! (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))
--- 498,520 ----
(< (point) delimline))
(replace-match "\n"))
(let ((case-fold-search t))
! (if (not (eq sendmail-resends t))
! (progn
! (goto-char (point-min))
! (while (re-search-forward "^Resent-\\(to\\|cc\\|bcc\\):" delimline t)
! (setq resend-to-addresses
! (save-restriction
! (narrow-to-region (point)
! (save-excursion
! (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))
***************
*** 599,609 ****
;; and "deliver in background".
(if (null mail-interactive) '("-oem" "-odb"))
;; Get the addresses from the message
! ;; unless this is a resend.
;; We must not do that for a resend
;; because we would find the original addresses.
;; For a resend, include the specific addresses.
! (or resend-to-addresses
'("-t")))))
(if mail-interactive
(save-excursion
--- 612,624 ----
;; and "deliver in background".
(if (null mail-interactive) '("-oem" "-odb"))
;; Get the addresses from the message
! ;; unless this is a resend and sendmail-resends
! ;; is not t.
;; We must not do that for a resend
;; because we would find the original addresses.
;; For a resend, include the specific addresses.
! (or (if (not (eq sendmail-resends t))
! resend-to-addresses)
'("-t")))))
(if mail-interactive
(save-excursion
--
DK> David Kågedal Lysator Academic Computer Society davidk@lysator.liu.se
DK> http://www.lysator.liu.se/~davidk/ +46-13 17 65 89
--
#include <disclaimer.h> /* Sten Drescher */
To get my PGP public key, send me email with your public key and
Subject: PGP key exchange
Key fingerprint = 90 5F 1D FD A6 7C 84 5E A9 D3 90 16 B2 44 C4 F3
prev parent reply other threads:[~1995-12-08 23:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-08 21:51 David K}gedal
1995-12-08 23:48 ` Sten Drescher [this message]
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=55pwdzf772.fsf@galil.austnsc.tandem.com \
--to=dreschs@mpd.tandem.com \
/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).