[Dovecot] Mailbox Delete

Timo Sirainen tss at iki.fi
Sat Nov 27 00:02:17 EET 2010


On 26.11.2010, at 19.47, Alex Baule wrote:

>        box = mailbox_alloc(ns->list, name, 0);
>            if (mailbox_delete(box) < 0) {
>                struct mail_storage *storage = mailbox_get_storage(box);
>                i_error("Can't delete mailbox %s: %s",
> name,mail_storage_get_last_error(storage, NULL));
>            }

This should be enough.

>            if (mailbox_mark_index_deleted(box, TRUE) < 0){
>                struct mail_storage *storage = mailbox_get_storage(box);
>                i_error("Can't delete INDEX %s: %s",
> name,mail_storage_get_last_error(storage, NULL));
>            }

The mailbox_delete() calls this internally, you shouldn't do it.

> /opt/addons/lib/dovecot/libdovecot-storage.so.0(index_storage_get_status+0x38d)
> [0xb770aced] -> /opt/addons/lib/dovecot/lib20_emexis_uis_plugin.so
> [0xb75009a1] ->
> /opt/addons/lib/dovecot/libdovecot-storage.so.0(mailbox_delete+0x4e)

Anyway, this points to the problem being in emexis_uis plugin. It's calling mailbox_get_status() in a delete hook without having the mailbox opened yet. It should probably be calling mailbox_open() first.


More information about the dovecot mailing list