diff --git a/internal/imap/mailbox_messages.go b/internal/imap/mailbox_messages.go index c52fdf18..cc321d78 100644 --- a/internal/imap/mailbox_messages.go +++ b/internal/imap/mailbox_messages.go @@ -451,11 +451,13 @@ func (im *imapMailbox) ListMessages(isUID bool, seqSet *imap.SeqSet, items []ima im.panicHandler.HandlePanic() }() - // EXPUNGE cannot be sent during listing and can come only from - // the event loop, so we prevent any server side update to avoid - // the problem. - im.user.pauseEventLoop() - defer im.user.unpauseEventLoop() + if !isUID { + // EXPUNGE cannot be sent during listing and can come only from + // the event loop, so we prevent any server side update to avoid + // the problem. + im.user.pauseEventLoop() + defer im.user.unpauseEventLoop() + } var markAsReadIDs []string markAsReadMutex := &sync.Mutex{}