*** sendmail-smtp-0_1b10.el Thu May 8 14:46:44 1997 --- sendmail-smtp-0_1b11.el Sat May 31 18:00:31 1997 *************** *** 23,28 **** --- 23,30 ---- ;; strings. ;; 0.1b10 calle@discord.bofh.se Fixed address extraction from header ;; fields so it works this time. + ;; 0.1b11 levitte@lp.se Added correct processing of "Resent-" + ;; headers. ;; ;;; (require 'sendmail) *************** *** 37,43 **** "Shall we keep the connection to the SMTP server alive in case we need it soon again?") ! (defconst sendmail-smtp-version "0.1b10") (defvar sendmail-smtp-buffer nil) (defun sendmail-strip-quoted-names (address) --- 39,45 ---- "Shall we keep the connection to the SMTP server alive in case we need it soon again?") ! (defconst sendmail-smtp-version "0.1b11") (defvar sendmail-smtp-buffer nil) (defun sendmail-strip-quoted-names (address) *************** *** 287,294 **** (point)))) (setq delimline (- delimline (- end begin))) (delete-region begin end)))) (goto-char (point-min)) ! (while (re-search-forward "^Resent-to:" delimline t) (setq resend-to-addresses (save-restriction (narrow-to-region (point) --- 289,297 ---- (point)))) (setq delimline (- delimline (- end begin))) (delete-region begin end)))) + ;; Find all Resent-To: headers (goto-char (point-min)) ! (while (re-search-forward "^Resent-\\(to\\|cc\\):" delimline t) (setq resend-to-addresses (save-restriction (narrow-to-region (point) *************** *** 302,307 **** --- 305,335 ---- (mapcar 'sendmail-strip-quoted-names (mail-parse-comma-list)) resend-to-addresses)))) + ;; Find and nuke all BCC fields + (goto-char (point-min)) + (while (re-search-forward "^Resent-BCC:" delimline t) + (setq resend-to-addresses + (save-restriction + (narrow-to-region (point) + (save-excursion + (forward-line) + (while (looking-at "[ \t]") + (forward-line)) + (backward-char) + (point))) + (append + (mapcar 'sendmail-strip-quoted-names + (mail-parse-comma-list)) + resend-to-addresses))) + (save-excursion + (let ((begin (progn (beginning-of-line) + (point))) + (end (progn (forward-line) + (while (looking-at "[ \t]") + (forward-line)) + (point)))) + (setq delimline (- delimline (- end begin))) + (delete-region begin end)))) ;;; Apparently this causes a duplicate Sender. ;;; ;; If the From is different than current user, insert Sender. ;;; (goto-char (point-min)) *************** *** 329,335 **** (sendmail-smtp-mail-buffer (concat (user-login-name) "@" (or sendmail-smtp-local-host (system-name))) ! send-to-addresses (current-buffer) (not sendmail-smtp-keep-alive))) (kill-buffer tembuf)))) --- 357,364 ---- (sendmail-smtp-mail-buffer (concat (user-login-name) "@" (or sendmail-smtp-local-host (system-name))) ! (or resend-to-addresses ! send-to-addresses) (current-buffer) (not sendmail-smtp-keep-alive))) (kill-buffer tembuf))))