<<< Date Index >>>     <<< Thread Index >>>

[PATCH 2 of 4] Add resent header weeding, used by sendbox



# HG changeset patch
# User Aron Griffis <agriffis@xxxxxxxxx>
# Date 1240931851 14400
# Branch HEAD
# Node ID 4119b23942284de13976e824c7231af8cb149e0e
# Parent  bffd60d2ac16fbc99be35a1b8bf51b6ce5ac36d4
Add resent header weeding, used by sendbox

Signed-off-by: Aron Griffis <agriffis@xxxxxxxxx>

diff -r bffd60d2ac16 -r 4119b2394228 copy.c
--- a/copy.c    Tue Apr 28 11:17:28 2009 -0400
+++ b/copy.c    Tue Apr 28 11:17:31 2009 -0400
@@ -65,7 +65,8 @@
   buf[0] = '\n';
   buf[1] = 0;
 
-  if ((flags & (CH_REORDER | CH_WEED | CH_MIME | CH_DECODE | CH_PREFIX | 
CH_WEED_DELIVERED)) == 0)
+  if ((flags & (CH_REORDER | CH_WEED | CH_MIME | CH_DECODE | CH_PREFIX | 
+               CH_WEED_DELIVERED | CH_WEED_RESENT)) == 0)
   {
     /* Without these flags to complicate things
      * we can do a more efficient line to line copying
@@ -194,6 +195,10 @@
       if ((flags & CH_WEED_DELIVERED) &&
          ascii_strncasecmp ("Delivered-To:", buf, 13) == 0)
        continue;
+      if ((flags & CH_WEED_RESENT) &&
+         (ascii_strncasecmp ("Resent-To:", buf, 10) == 0 ||
+          ascii_strncasecmp ("Resent-From:", buf, 12) == 0))
+       continue;
       if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
          (ascii_strncasecmp ("Status:", buf, 7) == 0 ||
           ascii_strncasecmp ("X-Status:", buf, 9) == 0))
diff -r bffd60d2ac16 -r 4119b2394228 copy.h
--- a/copy.h    Tue Apr 28 11:17:28 2009 -0400
+++ b/copy.h    Tue Apr 28 11:17:31 2009 -0400
@@ -52,6 +52,7 @@
 #define CH_NOQFROM        (1<<15) /* ignore ">From " line */
 #define CH_UPDATE_IRT     (1<<16) /* update In-Reply-To: */
 #define CH_UPDATE_REFS    (1<<17) /* update References: */
+#define CH_WEED_RESENT    (1<<18) /* weed Resent-To: header */
 
 
 int mutt_copy_hdr (FILE *, FILE *, LOFF_T, LOFF_T, int, const char *);