2006-10-18 [colin] 2.5.5cvs14
authorColin Leroy <colin@colino.net>
Wed, 18 Oct 2006 16:54:49 +0000 (16:54 +0000)
committerColin Leroy <colin@colino.net>
Wed, 18 Oct 2006 16:54:49 +0000 (16:54 +0000)
* src/compose.c
Fix redirecting of our own sent mails

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index d4f7beafc188f5deddd8d7417f9e63f4828b82c7..ddff5391632b0467babc8987b1d0c830461e8ed8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-18 [colin]     2.5.5cvs14
+
+       * src/compose.c
+               Fix redirecting of our own sent mails
+
 2006-10-17 [wwp]       2.5.5cvs13
 
        * src/send_message.c
index 7953f3678a65590ca0bd136aa62a15c30e34938a..e6df75c57ecd330686a6ce0ef96106a73b512d93 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/plugins/pgpcore/sgpgme.c;  ) > 2.5.5cvs11.patchset
 ( cvs diff -u -r 1.382.2.315 -r 1.382.2.316 src/compose.c;  ) > 2.5.5cvs12.patchset
 ( cvs diff -u -r 1.17.2.34 -r 1.17.2.35 src/send_message.c;  ) > 2.5.5cvs13.patchset
+( cvs diff -u -r 1.382.2.316 -r 1.382.2.317 src/compose.c;  ) > 2.5.5cvs14.patchset
index e7f463e728aa2d7ec0628cc2676b0edc715e7181..bef20902d554f5092484de30baf5e83ebc3503f5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=13
+EXTRA_VERSION=14
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1f252bc62541c0daf1078a53bf08d11cf16ebc02..e5242fae9127cf33972c02c5a4e2c3831bd188ac 100644 (file)
@@ -4348,26 +4348,38 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
        FILE *fp;
        size_t len;
        gchar buf[BUFFSIZE];
-
+       int i = 0;
+       gboolean skip = FALSE;
+       gchar *not_included[]={
+               "Return-Path:",         "Delivered-To:",        "Received:",
+               "Subject:",             "X-UIDL:",              "AF:",
+               "NF:",                  "PS:",                  "SRH:",
+               "SFN:",                 "DSR:",                 "MID:",
+               "CFG:",                 "PT:",                  "S:",
+               "RQ:",                  "SSV:",                 "NSV:",
+               "SSH:",                 "R:",                   "MAID:",
+               "NAID:",                "RMID:",                "FMID:",
+               "SCF:",                 "RRCPT:",               "NG:",
+               "X-Sylpheed-Privacy",   "X-Sylpheed-Sign:",     "X-Sylpheed-Encrypt",
+               "X-Sylpheed-End-Special-Headers:",
+               NULL
+               };
        if ((fp = g_fopen(compose->redirect_filename, "rb")) == NULL) {
                FILE_OP_ERROR(compose->redirect_filename, "fopen");
                return -1;
        }
 
        while (procheader_get_one_field_asis(buf, sizeof(buf), fp) != -1) {
-               /* should filter returnpath, delivered-to */
-               if (g_ascii_strncasecmp(buf, "Return-Path:",
-                                       strlen("Return-Path:")) == 0 ||
-                   g_ascii_strncasecmp(buf, "Delivered-To:",
-                                       strlen("Delivered-To:")) == 0 ||
-                   g_ascii_strncasecmp(buf, "Received:",
-                                       strlen("Received:")) == 0 ||
-                   g_ascii_strncasecmp(buf, "Subject:",
-                                       strlen("Subject:")) == 0 ||
-                   g_ascii_strncasecmp(buf, "X-UIDL:",
-                                       strlen("X-UIDL:")) == 0)
+               skip = FALSE;
+               for (i = 0; not_included[i] != NULL; i++) {
+                       if (g_ascii_strncasecmp(buf, not_included[i],
+                                               strlen(not_included[i])) == 0) {
+                               skip = TRUE;
+                               break;
+                       }
+               }
+               if (skip)
                        continue;
-
                if (fputs(buf, fdest) == -1)
                        goto error;