]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Virtual mailboxes: Configuration parsing fix.
authorTimo Sirainen <tss@iki.fi>
Sun, 12 Oct 2008 11:47:51 +0000 (14:47 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 12 Oct 2008 11:47:51 +0000 (14:47 +0300)
--HG--
branch : HEAD

src/plugins/virtual/virtual-config.c

index 771a9902a582713715deec46b85187cc00d0a163..ddd3e5fd7e73adadb71c112532b58960511d7cb0 100644 (file)
@@ -106,8 +106,12 @@ virtual_config_parse_line(struct virtual_parse_context *ctx, const char *line,
                str_append(ctx->rule, line);
                return 0;
        }
-       if (virtual_config_add_rule(ctx, error_r) < 0)
-               return -1;
+       /* if there is no rule yet, it means we want the previous mailboxes
+          to use the rule that comes later */
+       if (str_len(ctx->rule) > 0) {
+               if (virtual_config_add_rule(ctx, error_r) < 0)
+                       return -1;
+       }
 
        /* new mailbox. the search args are added to it later. */
        bbox = p_new(ctx->pool, struct virtual_backend_box, 1);