imap-expunge.c revision 1807ae2cbeb06f804d5b9af3e3d920417c3d4991
/* Copyright (c) 2003-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "mail-storage.h"
#include "mail-search.h"
#include "imap-expunge.h"
{
struct mail_search_context *ctx;
struct mailbox_transaction_context *t;
struct mail_search_arg search_arg;
if (mailbox_is_readonly(box)) {
/* silently ignore */
return 0;
}
/* Refresh the flags so we'll expunge all messages marked as \Deleted
by any session. */
}
if (mailbox_search_deinit(&ctx) < 0) {
return -1;
} else {
if (mailbox_transaction_commit(&t) < 0)
return -1;
}
return expunges ? 1 : 0;
}