[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sendmail.el's (sendmail-send-it) should not try to handle "Resent-" head
From: |
Greg A. Woods |
Subject: |
sendmail.el's (sendmail-send-it) should not try to handle "Resent-" headers |
Date: |
Tue, 9 Jan 2001 16:00:50 -0500 (EST) |
For the longest time I've been trying to blame Postfix for incorrectly
parsing a proper RFC-822 conformant "Resent-To:" header such as this:
Resent-To: "Greg A. Woods, RoboHack" <woods@weird.com>
Whenever I've tried to send a message with such a header I get
complaints from Postfix that it cannot deliver the message because the
address apparently gets mangled:
<" <woods"@weird.com>>: bad host/domain syntax: "weird.com>"
<"Greg A. Woods"@proven.weird.com>: unknown user: "greg a. woods"
<RoboHack@proven.weird.com>: unknown user: "robohack"
However the real problem is in sendmail.el, no Postfix!
Somehow the proper quoting is not being preserved when sendmail-send-it
puts the resend addresses on the sendmail command-line.
Ultimately though this special treatment of "resent-*" headers is not
necessary with any sendmail-compatible mailer (including Sendmail,
Smail, Postfix, and I think Exim too) since they will all "Do The Right
Thing(tm)" if just given the '-t' option on the command-line.
So, I would suggest that this code simply be removed from sendmail.el:
(these diffs against a version from the emacs-21 pretest, BTW)
Index: sendmail.el
===================================================================
RCS file: /cvs/gnu/emacs-21/lisp/mail/sendmail.el,v
retrieving revision 1.1.1.4
diff -c -u -r1.1.1.4 sendmail.el
--- sendmail.el 2000/10/14 01:06:51 1.1.1.4
+++ sendmail.el 2001/01/09 19:48:40
@@ -776,7 +776,7 @@
(coding (and (local-variable-p 'buffer-file-coding-system)
buffer-file-coding-system))
selected-coding
- resend-to-addresses
+;;; resend-to-addresses
delimline
fcc-was-found
(mailbuf (current-buffer)))
@@ -804,23 +804,23 @@
(replace-match "\n"))
(goto-char (point-min))
(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)
- (save-excursion
- (forward-line 1)
- (while (looking-at "^[ \t]")
- (forward-line 1))
- (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))))))
+;;; (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
+;;; (forward-line 1)
+;;; (while (looking-at "^[ \t]")
+;;; (forward-line 1))
+;;; (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))
@@ -961,13 +961,16 @@
;; These mean "report errors by mail"
;; and "deliver in background".
'("-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"))))
+;;; ;; 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")
+;;; )
+ )
+ )
(exit-value (apply 'call-process-region args)))
(or (null exit-value) (zerop exit-value)
(error "Sending...failed with exit value %d" exit-value)))
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- sendmail.el's (sendmail-send-it) should not try to handle "Resent-" headers,
Greg A. Woods <=