From: Karl Fleischmann Date: Wed, 7 Dec 2022 16:42:34 +0000 (+0100) Subject: config: Warn about obsolete imapc features X-Git-Tag: 2.4.0~3265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bba9afd1c9732b7ff988d20a1fa54de1c32ead80;p=thirdparty%2Fdovecot%2Fcore.git config: Warn about obsolete imapc features --- diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index 115bb2ca28..b790e86b47 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -333,6 +333,30 @@ old_settings_handle_root(struct config_parser_context *ctx, key, value); return TRUE; } + if (strcmp(key, "imapc_features") == 0) { + char **args = p_strsplit_spaces( + pool_datastack_create(), value, " "); + for (char **arg = args; *arg != NULL; arg++) { + if (strcmp(*arg, "rfc822.size") == 0 || + strcmp(*arg, "fetch-headers") == 0 || + strcmp(*arg, "search") == 0 || + strcmp(*arg, "modseq") == 0 || + strcmp(*arg, "delay-login") == 0 || + strcmp(*arg, "fetch-bodystructure") == 0 || + strcmp(*arg, "acl") == 0) { + obsolete(ctx, + "The imapc feature '%s' is no longer necessary, " + "it is enabled by default.", + *arg); + *arg = ""; + } + } + value = t_strarray_join((void *)args, " "); + config_parser_apply_line(ctx, CONFIG_LINE_TYPE_KEYVALUE, key, + value); + return TRUE; + } + return FALSE; }