]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Change mail_attachment_detection_options default
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 26 Mar 2025 10:39:49 +0000 (12:39 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Oct 2025 11:28:44 +0000 (11:28 +0000)
Set it to: add-flags content-type=!application/signature. However, this
breaks mbox format so keep it empty for mbox. Also don't enable it for
imapc, since it's unlikely to be useful there and it might cause unwanted
attachment flags to be added in some imapc use cases.

src/lib-settings/settings-history-core.txt
src/lib-storage/mail-storage-settings.c

index e65744e4df6bf35cb32e0eb99a7f80dfcd332a46..bdec3c7747c37c90a33530d51473991f8f4f1d6b 100644 (file)
@@ -1,3 +1,4 @@
+default        mail_attachment_detection_options               2.4.2   3.2.0
 default        @metric_defaults/proxy/metric   auth_successes,auth_failures,login_aborted      2.4.2   3.2.0
 default        fts_search_read_fallback        yes     -       3.2.0
 default        mailbox_directory_name_legacy   yes     2.4.2   3.2.0
index 3a09bb4cfe72f48fa6c00eca622605765300d1aa..b6536c04987189274a58406a9f3cd10cd12dd38f 100644 (file)
@@ -204,6 +204,13 @@ static const struct setting_keyvalue mail_storage_default_settings_keyvalue[] =
        { "mail_always_cache_fields", MAIL_CACHE_FIELDS_DEFAULT },
 #endif
        { "mail_never_cache_fields", "imap.envelope" },
+       { "mail_attachment_detection_options", "add-flags content-type=!application/signature" },
+       /* This breaks mbox format in various ways */
+       { "mbox/mail_attachment_detection_options", "" },
+       /* It may be confusing to enable with imapc, and it's unlikely to be
+          useful. Even when using imapc with shared folders, the missing
+          attachment flags would normally be added by the remote server. */
+       { "imapc/mail_attachment_detection_options", "" },
        { NULL, NULL }
 };