imap-expunge.c revision bcb4e51a409d94ae670de96afb8483a4f7855294
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen/* Copyright (c) 2003-2018 Dovecot authors, see the included COPYING file */
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenint imap_expunge(struct mailbox *box, struct mail_search_arg *next_search_arg,
f16c114c20bbd7d292d93415d1e56c8dd6abd3e7Timo Sirainen /* silently ignore */
f16c114c20bbd7d292d93415d1e56c8dd6abd3e7Timo Sirainen search_args->args = p_new(search_args->pool, struct mail_search_arg, 1);
f16c114c20bbd7d292d93415d1e56c8dd6abd3e7Timo Sirainen search_args->args->value.flags = MAIL_DELETED;
f16c114c20bbd7d292d93415d1e56c8dd6abd3e7Timo Sirainen /* Refresh the flags so we'll expunge all messages marked as \Deleted
f16c114c20bbd7d292d93415d1e56c8dd6abd3e7Timo Sirainen by any session. */
f16c114c20bbd7d292d93415d1e56c8dd6abd3e7Timo Sirainen t = mailbox_transaction_begin(box, MAILBOX_TRANSACTION_FLAG_REFRESH,