]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Removed caching body snippet while message is being saved.
authorTimo Sirainen <tss@iki.fi>
Mon, 19 Jan 2015 19:58:19 +0000 (21:58 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 19 Jan 2015 19:58:19 +0000 (21:58 +0200)
This broke saving mails with dbox, because it attempts to open the mails
too early. Also the generation was a bit costly operation to do if it wasn't
actually wanted to be cached.

So in future we'd first want to check if body snippet is actually wanted. If
it is, then generate the potential snippets while the message is being
parsed (always generate the snippet for the best found MIME part, replacing
existing snippets when needed). This requires the message_snippet_generate()
API to support sending input as partial message_blocks.

src/lib-storage/index/index-mail-headers.c

index 17bf92185f4dbb3adf7c0d5e46beff4059c0805e..282d5016e0027610e6043da1e096ff92bcd00c2a 100644 (file)
@@ -383,7 +383,6 @@ index_mail_cache_parse_init(struct mail *_mail, struct istream *input)
        mail->data.save_sent_date = TRUE;
        mail->data.save_bodystructure_header = TRUE;
        mail->data.save_bodystructure_body = TRUE;
-       mail->data.save_body_snippet = TRUE;
 
        mail->data.tee_stream = tee_i_stream_create(input);
        input = tee_i_stream_create_child(mail->data.tee_stream);