Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Bug fix for mail-followup-to
@ 2001-11-03 21:09 Matt Armstrong
  2001-11-04 14:33 ` ShengHuo ZHU
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Armstrong @ 2001-11-03 21:09 UTC (permalink / raw)


If you trace through message-send-mail, you'll see that the second
call to message-generate-headers -- the one that adds the
Mail-Followup-To: header -- erases the previously generated Date:,
Message-Id: and Lines: headers.  This is bad because only the Lines:
header gets subsequently generated, so the Message-Id: and Date:
headers must be inserted by the MTA (sendmail, etc.).

This patch fixes that:

Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 6.825
diff -u -r6.825 ChangeLog
--- lisp/ChangeLog	2001/11/01 18:53:26	6.825
+++ lisp/ChangeLog	2001/11/03 20:38:06
@@ -1,3 +1,9 @@
+2001-11-03  Matt Armstrong  <matt@lickey.com>
+
+	* message.el (message-send-mail): Set message-deletable-headers to
+	nil around call to message-generate-headers when generating
+	Mail-Followup-To: (so Message-Id:, Date:, etc. are not deleted).
+
 2001-11-01  Simon Josefsson  <jas@extundo.com>
 
 	* message.el (message-insert-canlock): New variable.
Index: lisp/message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.145
diff -u -r6.145 message.el
--- lisp/message.el	2001/11/01 18:53:26	6.145
+++ lisp/message.el	2001/11/03 20:38:16
@@ -2572,8 +2572,9 @@
 		   message-subscribed-addresses
 		   message-subscribed-address-functions)
 	       (not (mail-fetch-field "mail-followup-to")))
-	  (message-generate-headers
-	   `(("Mail-Followup-To" . ,(message-make-mft))))
+	  (let ((message-deletable-headers nil))
+	    (message-generate-headers
+	     `(("Mail-Followup-To" . ,(message-make-mft)))))
 	;; otherwise, delete the MFT header if the field is empty
 	(when (equal "" (mail-fetch-field "mail-followup-to"))
 	  (message-remove-header "Mail-Followup-To")))




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

* Re: [PATCH] Bug fix for mail-followup-to
  2001-11-03 21:09 [PATCH] Bug fix for mail-followup-to Matt Armstrong
@ 2001-11-04 14:33 ` ShengHuo ZHU
  2001-11-04 19:21   ` Matt Armstrong
  0 siblings, 1 reply; 3+ messages in thread
From: ShengHuo ZHU @ 2001-11-04 14:33 UTC (permalink / raw)


"Matt Armstrong" <matt+dated+1007413744.f977c8@lickey.com> writes:

> If you trace through message-send-mail, you'll see that the second
> call to message-generate-headers -- the one that adds the
> Mail-Followup-To: header -- erases the previously generated Date:,
> Message-Id: and Lines: headers.  This is bad because only the Lines:
> header gets subsequently generated, so the Message-Id: and Date:
> headers must be inserted by the MTA (sendmail, etc.).

Thanks. I fix it in another way, calling message-generate-headers
once.

ShengHuo



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

* Re: [PATCH] Bug fix for mail-followup-to
  2001-11-04 14:33 ` ShengHuo ZHU
@ 2001-11-04 19:21   ` Matt Armstrong
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Armstrong @ 2001-11-04 19:21 UTC (permalink / raw)


ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> "Matt Armstrong" <matt+dated+1007413744.f977c8@lickey.com> writes:
>
>> If you trace through message-send-mail, you'll see that the second
>> call to message-generate-headers -- the one that adds the
>> Mail-Followup-To: header -- erases the previously generated Date:,
>> Message-Id: and Lines: headers.  This is bad because only the Lines:
>> header gets subsequently generated, so the Message-Id: and Date:
>> headers must be inserted by the MTA (sendmail, etc.).
>
> Thanks. I fix it in another way, calling message-generate-headers
> once.

A better fix, and it works too!  ;-)


-- 
matt



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

end of thread, other threads:[~2001-11-04 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-03 21:09 [PATCH] Bug fix for mail-followup-to Matt Armstrong
2001-11-04 14:33 ` ShengHuo ZHU
2001-11-04 19:21   ` Matt Armstrong

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).