From: Timo Sirainen Date: Mon, 14 Oct 2024 11:34:43 +0000 (+0300) Subject: dbox: Fail reading mails if it has external attachment and mail_ext_attachment_dir... X-Git-Tag: 2.4.1~618 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1a9ef03e85a64c6627f0751ce2b0f13e7fc1aee;p=thirdparty%2Fdovecot%2Fcore.git dbox: Fail reading mails if it has external attachment and mail_ext_attachment_dir is empty Previously it was just silently dropping the attachments. --- 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,