]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lda: If Sieve is disabled, don't create temp files for large mails.
authorTimo Sirainen <tss@iki.fi>
Wed, 3 Nov 2010 18:00:15 +0000 (18:00 +0000)
committerTimo Sirainen <tss@iki.fi>
Wed, 3 Nov 2010 18:00:15 +0000 (18:00 +0000)
src/lda/main.c

index 66cd33a6a9de0baa88416c114e6621105e7f70de..50fbc95644b68b10fab65734055551381e39cece 100644 (file)
@@ -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 {