]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
virtual: If virtual mailbox has no config file, assume it's just nonexistent.
authorTimo Sirainen <tss@iki.fi>
Tue, 29 Oct 2013 16:59:20 +0000 (18:59 +0200)
committerTimo Sirainen <tss@iki.fi>
Tue, 29 Oct 2013 16:59:20 +0000 (18:59 +0200)
Most importantly if the virtual namespace root doesn't have the config, it
should fail with MAIL_ERROR_NOTFOUND rather than MAIL_ERROR_NOTPOSSIBLE.

src/plugins/virtual/virtual-config.c

index 2acf6e06b2be198ef4f7b542271de3063825ba92..a6e656ccd783d991960bb4d877798ff73ea0095b 100644 (file)
@@ -356,7 +356,6 @@ int virtual_config_read(struct virtual_mailbox *mbox)
 {
        struct mail_storage *storage = mbox->box.storage;
        struct virtual_parse_context ctx;
-       struct stat st;
        const char *box_path, *path, *line, *error;
        unsigned int linenum = 0;
        int fd, ret = 0;
@@ -374,9 +373,6 @@ int virtual_config_read(struct virtual_mailbox *mbox)
                } else if (errno != ENOENT) {
                        mail_storage_set_critical(storage,
                                                  "open(%s) failed: %m", path);
-               } else if (stat(box_path, &st) == 0) {
-                       mail_storage_set_error(storage, MAIL_ERROR_NOTPOSSIBLE,
-                               "Virtual mailbox missing configuration file");
                } else if (errno == ENOENT) {
                        mail_storage_set_error(storage, MAIL_ERROR_NOTFOUND,
                                T_MAIL_ERR_MAILBOX_NOT_FOUND(mbox->box.vname));