GODT-965 MOVE command should end with error for All Mail

This commit is contained in:
Xavier Michelon
2021-09-23 16:14:28 +02:00
committed by Jakub Cuth
parent a4a29cbf82
commit 8d6e55ba54
2 changed files with 6 additions and 6 deletions

View File

@ -266,6 +266,10 @@ func (im *imapMailbox) labelMessages(uid bool, seqSet *imap.SeqSet, targetLabel
}
return errors.New("move from Sent to Inbox is not allowed")
}
// Moving from All Mail is not allowed.
if im.storeMailbox.LabelID() == pmapi.AllMailLabel {
return errors.New("move from All Mail is not allowed")
}
deletedIDs := []string{}
allDeletedIDs, err := im.storeMailbox.GetDeletedAPIIDs()