From f1a9ef03e85a64c6627f0751ce2b0f13e7fc1aee Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 14 Oct 2024 14:34:43 +0300 Subject: [PATCH] dbox: Fail reading mails if it has external attachment and mail_ext_attachment_dir is empty Previously it was just silently dropping the attachments. --- src/lib-storage/index/dbox-common/dbox-mail.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib-storage/index/dbox-common/dbox-mail.c b/src/lib-storage/index/dbox-common/dbox-mail.c index 9595faf5e9..01b4ca1456 100644 --- a/src/lib-storage/index/dbox-common/dbox-mail.c +++ b/src/lib-storage/index/dbox-common/dbox-mail.c @@ -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, -- 2.47.3