diff --git a/src/lib-sieve/plugins/mailbox/cmd-mailboxexists.c b/src/lib-sieve/plugins/mailbox/cmd-mailboxexists.c index 67f0a024a614c2bb3dc25d2d83d9d142390d5b83..59fcee4419560dff08f217addb26d7c734845709 100644 --- a/src/lib-sieve/plugins/mailbox/cmd-mailboxexists.c +++ b/src/lib-sieve/plugins/mailbox/cmd-mailboxexists.c @@ -135,7 +135,6 @@ static int tst_mailboxexists_operation_execute (mailbox_names, &mailbox_item)) && mailbox_item != NULL ) { struct mail_namespace *ns; - struct mail_storage *storage; const char *mailbox = str_c(mailbox_item); struct mailbox *box; @@ -147,9 +146,8 @@ static int tst_mailboxexists_operation_execute } /* Open the box */ - storage = ns->storage; - box = mailbox_open(&storage, mailbox, NULL, MAILBOX_OPEN_FAST); - if ( box == NULL ) { + box = mailbox_alloc(ns->list, mailbox, NULL, 0); + if ( mailbox_open(box) < 0 ) { all_exist = FALSE; break; }