[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.94.2.7, 1.94.2.8 mbox-storage.c, 1.145.2.7, 1.145.2.8 mbox-storage.h, 1.43, 1.43.2.1

tss at dovecot.org tss at dovecot.org
Mon Feb 19 14:45:50 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv5606/lib-storage/index/mbox

Modified Files:
      Tag: branch_1_0
	mbox-save.c mbox-storage.c mbox-storage.h 
Log Message:
Drop X-Delivery-ID header when saving the message.



Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.94.2.7
retrieving revision 1.94.2.8
diff -u -d -r1.94.2.7 -r1.94.2.8
--- mbox-save.c	19 Feb 2007 14:35:57 -0000	1.94.2.7
+++ mbox-save.c	19 Feb 2007 14:45:47 -0000	1.94.2.8
@@ -471,14 +471,12 @@
 	if (write_from_line(ctx, received_date, from_envelope) < 0)
 		ctx->failed = TRUE;
 	else {
-		ctx->input =
-			i_stream_create_header_filter(input,
-						      HEADER_FILTER_EXCLUDE |
-                                                      HEADER_FILTER_NO_CR,
-						      mbox_hide_headers,
-						      mbox_hide_headers_count,
-						      save_header_callback,
-						      ctx);
+		ctx->input = i_stream_create_header_filter(input,
+						HEADER_FILTER_EXCLUDE |
+						HEADER_FILTER_NO_CR,
+						mbox_save_drop_headers,
+						mbox_save_drop_headers_count,
+						save_header_callback, ctx);
 		ctx->body_output =
 			(STORAGE(mbox->storage)->flags &
 			 MAIL_STORAGE_FLAG_SAVE_CRLF) != 0 ?

Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.145.2.7
retrieving revision 1.145.2.8
diff -u -d -r1.145.2.7 -r1.145.2.8
--- mbox-storage.c	14 Jan 2007 01:47:18 -0000	1.145.2.7
+++ mbox-storage.c	19 Feb 2007 14:45:47 -0000	1.145.2.8
@@ -42,6 +42,21 @@
 unsigned int mbox_hide_headers_count =
 	sizeof(mbox_hide_headers) / sizeof(mbox_hide_headers[0]);
 
+/* A bit ugly duplification of the above list. It's safe to modify this list
+   without bad side effects, just keep the list sorted. */
+const char *mbox_save_drop_headers[] = {
+	"Content-Length",
+	"Status",
+	"X-Delivery-ID",
+	"X-IMAP",
+	"X-IMAPbase",
+	"X-Keywords",
+	"X-Status",
+	"X-UID"
+};
+unsigned int mbox_save_drop_headers_count =
+	sizeof(mbox_save_drop_headers) / sizeof(mbox_save_drop_headers[0]);
+
 extern struct mail_storage mbox_storage;
 extern struct mailbox mbox_mailbox;
 

Index: mbox-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.h,v
retrieving revision 1.43
retrieving revision 1.43.2.1
diff -u -d -r1.43 -r1.43.2.1
--- mbox-storage.h	9 Apr 2006 15:50:29 -0000	1.43
+++ mbox-storage.h	19 Feb 2007 14:45:47 -0000	1.43.2.1
@@ -58,8 +58,8 @@
 };
 
 extern struct mail_vfuncs mbox_mail_vfuncs;
-extern const char *mbox_hide_headers[];
-extern unsigned int mbox_hide_headers_count;
+extern const char *mbox_hide_headers[], *mbox_save_drop_headers[];
+extern unsigned int mbox_hide_headers_count, mbox_save_drop_headers_count;
 
 int mbox_set_syscall_error(struct mbox_mailbox *mbox, const char *function);
 



More information about the dovecot-cvs mailing list