From cb506a7cbb4d21cfcaebe7f4fcc0c1b489c4d7b6 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 3 Nov 2010 18:00:15 +0000 Subject: [PATCH] lda: If Sieve is disabled, don't create temp files for large mails. --- src/lda/main.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 { -- 2.47.3