[GODT-797] EXPUNGE waits for APPEND to prevent data loss when Outlook moves from Spam to Inbox

This commit is contained in:
Jakub
2021-01-14 16:39:34 +01:00
parent 2f149eb545
commit 44f8a49b47
6 changed files with 33 additions and 3 deletions

View File

@ -70,6 +70,9 @@ func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.L
// Called from go-imap in goroutines - we need to handle panics for each function.
defer im.panicHandler.HandlePanic()
im.user.appendStarted()
defer im.user.appendFinished()
m, _, _, readers, err := message.Parse(body)
if err != nil {
return err