Try the attached patch. I'll also put it into stable.
Index: copy.c
===================================================================
RCS file: /home/roessler/cvsroot/mutt/copy.c,v
retrieving revision 2.4
diff -u -u -r2.4 copy.c
--- copy.c      1999/02/02 15:47:51     2.4
+++ copy.c      1999/03/15 15:08:34
@@ -60,7 +60,7 @@
   buf[0] = '\n';
   buf[1] = 0;
 
-  if ((flags & (CH_REORDER | CH_WEED | CH_MIME | CH_DECODE | CH_PREFIX)) == 0)
+  if ((flags & (CH_REORDER | CH_WEED | CH_MIME | CH_DECODE | CH_PREFIX | 
+CH_WEED_DELIVERED)) == 0)
   {
     /* Without these flags to complicate things
      * we can do a more efficient line to line copying
@@ -148,6 +148,9 @@
       if ((flags & CH_WEED) && 
          mutt_matches_ignore (buf, Ignore) &&
          !mutt_matches_ignore (buf, UnIgnore))
+       continue;
+      if ((flags & CH_WEED_DELIVERED) &&
+         mutt_strncasecmp ("Delivered-To:", buf, 13) == 0)
        continue;
       if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
          (mutt_strncasecmp ("Status:", buf, 7) == 0 ||
Index: init.h
===================================================================
RCS file: /home/roessler/cvsroot/mutt/init.h,v
retrieving revision 2.20
diff -u -u -r2.20 init.h
--- init.h      1999/03/02 20:32:02     2.20
+++ init.h      1999/03/15 15:12:19
@@ -85,6 +85,7 @@
   { "auto_tag",                DT_BOOL, R_NONE, OPTAUTOTAG, 0 },
   { "beep",            DT_BOOL, R_NONE, OPTBEEP, 1 },
   { "beep_new",                DT_BOOL, R_NONE, OPTBEEPNEW, 0 },
+  { "bounce_delivered", DT_BOOL, R_NONE, OPTBOUNCEDELIVERED, 1 },
   { "charset",         DT_STR,  R_NONE, UL &Charset, UL "iso-8859-1" },
   { "check_new",       DT_BOOL, R_NONE, OPTCHECKNEW, 1 },
   { "collapse_unread", DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 },
Index: mutt.h
===================================================================
RCS file: /home/roessler/cvsroot/mutt/mutt.h,v
retrieving revision 2.22
diff -u -u -r2.22 mutt.h
--- mutt.h      1999/02/28 08:05:56     2.22
+++ mutt.h      1999/03/15 15:25:16
@@ -86,6 +86,7 @@
 #define CH_UPDATE_LEN  (1<<10) /* update Lines: and Content-Length: */
 #define CH_TXTPLAIN    (1<<11) /* generate text/plain MIME headers */
 #define CH_NOLEN       (1<<12) /* don't write Content-Length: and Lines: */
+#define CH_WEED_DELIVERED (1<<13) /* weed eventual Delivered-To headers */
 
 /* flags for mutt_enter_string() */
 #define  M_ALIAS   1      /* do alias "completion" by calling up the alias-menu */
@@ -289,6 +290,7 @@
   OPTAUTOTAG,
   OPTBEEP,
   OPTBEEPNEW,
+  OPTBOUNCEDELIVERED,
   OPTCHECKNEW,
   OPTCOLLAPSEUNREAD,
   OPTCONFIRMAPPEND,
Index: sendlib.c
===================================================================
RCS file: /home/roessler/cvsroot/mutt/sendlib.c,v
retrieving revision 2.17
diff -u -u -r2.17 sendlib.c
--- sendlib.c   1999/03/03 19:58:53     2.17
+++ sendlib.c   1999/03/15 15:12:41
@@ -1821,9 +1821,13 @@
     if ((f = safe_fopen (tempfile, "w")) != NULL)
     {
       const char *fqdn;
-
+      int ch_flags = CH_XMIT | CH_NONEWLINE;
+      
+      if (!option (OPTBOUNCEDELIVERED))
+       ch_flags |= CH_WEED_DELIVERED;
+      
       fseek (msg->fp, h->offset, 0);
-      mutt_copy_header (msg->fp, h, f, CH_XMIT | CH_NONEWLINE, NULL);
+      mutt_copy_header (msg->fp, h, f, ch_flags, NULL);
       fprintf (f, "Resent-From: %s", NONULL(Username));
       if((fqdn = mutt_fqdn(1)))
        fprintf (f, "@%s", fqdn);
Index: doc/manual.sgml.in
===================================================================
RCS file: /home/roessler/cvsroot/mutt/doc/manual.sgml.in,v
retrieving revision 1.26
diff -u -u -r1.26 manual.sgml.in
--- manual.sgml.in      1999/02/26 15:42:07     1.26
+++ manual.sgml.in      1999/03/15 15:13:36
@@ -2608,6 +2608,15 @@
 message notifying you of new mail.  This is independent of the
 setting of the <ref id="beep" name="beep"> variable.
 
+<sect2>bounce&lowbar;delivered<label id="bounce_delivered">
+<p>
+Type boolean<newline>
+Default: set
+
+When this variable is set, mutt will include Delivered-To headers
+when bouncing messages.  Postfix users may wish to unset this
+variable.
+
 <sect2>charset<label id="charset">
 <p>
 Type: string<newline>

Reply via email to