@Override public Iterator<MessageUid> expunge(MessageRange set, MailboxSession mailboxSession) throws MailboxException { if (!isWriteable(mailboxSession)) { throw new ReadOnlyException(getMailboxPath(), mailboxSession.getPathDelimiter()); } Map<MessageUid, MessageMetaData> uids = deleteMarkedInMailbox(set, mailboxSession); dispatcher.expunged(mailboxSession, uids, getMailboxEntity()); return uids.keySet().iterator(); }