]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Handle obsolete imap_client_workarounds
authorTimo Sirainen <tss@iki.fi>
Mon, 19 Jul 2010 18:19:29 +0000 (19:19 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 19 Jul 2010 18:19:29 +0000 (19:19 +0100)
src/config/config-parser.c
src/config/old-set-parser.c

index 5c0f9370ddfb8a8b8eca4d72e4a9b75ff2b435be..7d0602160052831c74789b4b5ef0926ae67126c1 100644 (file)
@@ -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) {
index d7362c32b024d9f4005acc531c7561c5f6c93b86..76b10abf91e2b9ebaf60e22836a5397f8b82ac13 100644 (file)
@@ -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 ||