[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.104, 1.105 mbox-storage.c, 1.163, 1.164 mbox-storage.h, 1.47, 1.48
tss at dovecot.org
tss at dovecot.org
Mon Feb 19 14:45:55 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv5610
Modified Files:
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.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- mbox-save.c 19 Feb 2007 14:36:00 -0000 1.104
+++ mbox-save.c 19 Feb 2007 14:45:51 -0000 1.105
@@ -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.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- mbox-storage.c 18 Jan 2007 14:34:44 -0000 1.163
+++ mbox-storage.c 19 Feb 2007 14:45:52 -0000 1.164
@@ -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.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mbox-storage.h 1 Dec 2006 20:55:05 -0000 1.47
+++ mbox-storage.h 19 Feb 2007 14:45:52 -0000 1.48
@@ -62,8 +62,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