]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: Fail reading mails if it has external attachment and mail_ext_attachment_dir...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 14 Oct 2024 11:34:43 +0000 (14:34 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:00 +0000 (10:40 +0200)
Previously it was just silently dropping the attachments.

src/lib-storage/index/dbox-common/dbox-mail.c

index 9595faf5e98aab2d0fdc55fdd74b0202d24bb369..01b4ca14568be0df85c677ac4dd485f21444f965 100644 (file)
@@ -278,10 +278,7 @@ get_mail_stream(struct dbox_mail *mail, uoff_t offset,
                if (pmail->v.istream_opened(&pmail->mail, stream_r) < 0)
                        return -1;
        }
-       if (file->storage->attachment_dir == NULL)
-               return 1;
-       else
-               return dbox_attachment_file_get_stream(file, stream_r);
+       return dbox_attachment_file_get_stream(file, stream_r);
 }
 
 int dbox_mail_get_stream(struct mail *_mail, bool get_body ATTR_UNUSED,