protected void doProcess(CloseRequest message, ImapSession session, String tag, ImapCommand command, Responder responder) {
try {
MessageManager mailbox = getSelectedMailbox(session);
final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
if (mailbox.getMetaData(false, mailboxSession, FetchGroup.NO_COUNT).isWriteable()) {
mailbox.expunge(MessageRange.all(), mailboxSession);
session.deselect();
// Don't send HIGHESTMODSEQ when close. Like correct in the ERRATA of RFC5162
//
// See http://www.rfc-editor.org/errata_search.php?rfc=5162