From 6d77b6e87e1ff82e229457420e89af0357c64490 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Wed, 18 Oct 2006 16:54:49 +0000 Subject: [PATCH] 2006-10-18 [colin] 2.5.5cvs14 * src/compose.c Fix redirecting of our own sent mails --- ChangeLog | 5 +++++ PATCHSETS | 1 + configure.ac | 2 +- src/compose.c | 38 +++++++++++++++++++++++++------------- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4f7beafc..ddff53916 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index 7953f3678..e6df75c57 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1999,3 +1999,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index e7f463e72..bef20902d 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/compose.c b/src/compose.c index 1f252bc62..e5242fae9 100644 --- a/src/compose.c +++ b/src/compose.c @@ -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; -- 2.25.1