From: Timo Sirainen Date: Mon, 19 Jul 2010 18:19:29 +0000 (+0100) Subject: config: Handle obsolete imap_client_workarounds X-Git-Tag: 2.0.rc3~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d461a91e5eb2270e77f4276f0268ba1eede6a08d;p=thirdparty%2Fdovecot%2Fcore.git config: Handle obsolete imap_client_workarounds --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 5c0f9370dd..7d06021600 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -783,6 +783,7 @@ int config_parse_file(const char *path, bool expand_values, const char *module, enum config_line_type type; char *line; int fd, ret = 0; + bool handled; fd = open(path, O_RDONLY); if (fd < 0) { @@ -829,7 +830,10 @@ prevfile: &key, &value); str_truncate(ctx.str, ctx.pathlen); - if (!old_settings_handle(&ctx, type, key, value)) + T_BEGIN { + handled = old_settings_handle(&ctx, type, key, value); + } T_END; + if (!handled) config_parser_apply_line(&ctx, type, key, value); if (ctx.error != NULL) { diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index d7362c32b0..76b10abf91 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -145,6 +145,24 @@ old_settings_handle_root(struct config_parser_context *ctx, set_rename(ctx, key, "mdbox_rotate_size", value); return TRUE; } + if (strcmp(key, "imap_client_workarounds") == 0) { + char **args, **arg; + + args = p_strsplit_spaces(pool_datastack_create(), value, " ,"); + for (arg = args; *arg != NULL; arg++) { + if (strcmp(*arg, "outlook-idle") == 0) { + *arg = ""; + obsolete(ctx, "imap_client_workarounds=outlook-idle is no longer necessary"); + } else if (strcmp(*arg, "netscape-eoh") == 0) { + *arg = ""; + obsolete(ctx, "imap_client_workarounds=netscape-eoh is no longer supported"); + } + } + value = t_strarray_join((void *)args, " "); + config_parser_apply_line(ctx, CONFIG_LINE_TYPE_KEYVALUE, + key, value); + return TRUE; + } if (strcmp(key, "login_dir") == 0 || strcmp(key, "dbox_rotate_min_size") == 0 ||