dovecot-2.2: lib-storage: Don't save text/* MIME parts to extern...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 10 00:16:19 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/b1453bc21609
changeset: 14752:b1453bc21609
user: Timo Sirainen <tss at iki.fi>
date: Fri Aug 10 00:16:08 2012 +0300
description:
lib-storage: Don't save text/* MIME parts to external attachments even if they're big enough.
diffstat:
src/lib-storage/index/index-attachment.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 1a938b81cc5f -r b1453bc21609 src/lib-storage/index/index-attachment.c
--- a/src/lib-storage/index/index-attachment.c Thu Aug 09 18:50:31 2012 +0300
+++ b/src/lib-storage/index/index-attachment.c Fri Aug 10 00:16:08 2012 +0300
@@ -41,8 +41,12 @@
apart.content_type = hdr->content_type;
apart.content_disposition = hdr->content_disposition;
- return ctx->part_is_attachment == NULL ? TRUE :
- ctx->part_is_attachment(ctx, &apart);
+ if (ctx->part_is_attachment != NULL)
+ return ctx->part_is_attachment(ctx, &apart);
+
+ /* don't treat text/ parts as attachments */
+ return hdr->content_type != NULL &&
+ strncasecmp(hdr->content_type, "text/", 5) != 0;
}
static int index_attachment_open_temp_fd(void *context)
More information about the dovecot-cvs
mailing list