static int mailbox_delete_sieve(struct mailbox *mailbox)
{
    struct sieve_db *sievedb = NULL;

    if (mbtype_isa(mailbox_mbtype(mailbox)) != MBTYPE_SIEVE) return 0;

    sievedb = sievedb_open_mailbox(mailbox);
    if (sievedb) {
        int r = sievedb_delmbox(sievedb);
        sievedb_close(sievedb);
        if (r) return r;
    }

    return 0;
}
static int mailbox_delete_sieve(struct mailbox *mailbox)
{
    struct sieve_db *sievedb = NULL;

    if (mbtype_isa(mailbox_mbtype(mailbox)) != MBTYPE_SIEVE) return 0;

    sievedb = sievedb_open_mailbox(mailbox);
    if (sievedb) {
        int r = sievedb_delmbox(sievedb);
        sievedb_close(sievedb);
        if (r) return r;
    }

    return 0;
}