From: Timo Sirainen Date: Wed, 3 Nov 2010 18:00:15 +0000 (+0000) Subject: lda: If Sieve is disabled, don't create temp files for large mails. X-Git-Tag: 2.0.7~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cb506a7cbb4d21cfcaebe7f4fcc0c1b489c4d7b6;p=thirdparty%2Fdovecot%2Fcore.git lda: If Sieve is disabled, don't create temp files for large mails. --- diff --git a/src/lda/main.c b/src/lda/main.c index 66cd33a6a9..50fbc95644 100644 --- a/src/lda/main.c +++ b/src/lda/main.c @@ -154,6 +154,13 @@ create_raw_stream(struct mail_deliver_context *ctx, i_free(sender); if (input->v_offset == 0) { + if (deliver_mail == NULL) { + /* no Sieve or any other plugin. this input stream + simply passes to mailbox_save(), so it doesn't need + to be seekable and we can avoid creating temp files + for large mails. */ + return input; + } input2 = input; i_stream_ref(input2); } else {