imapserver: implement MULTIAPPEND extension, rfc 3502

MULTIAPPEND modifies the existing APPEND command to allow multiple messages. it
is somewhat more involved than a regular append of a single message since the
operation (of adding multiple messages) must be atomic. either all are added,
or none are.

we check as early as possible if the messages won't cause an over-quota error.
This commit is contained in:
Mechiel Lukkien
2025-02-24 15:47:47 +01:00
parent b56d6c4061
commit 78e0c0255f
10 changed files with 286 additions and 106 deletions

View File

@ -205,8 +205,8 @@ func (c *Conn) xrespCode() (string, CodeArg) {
c.xspace()
destUIDValidity := c.xnzuint32()
c.xspace()
uid := c.xnzuint32()
codeArg = CodeAppendUID{destUIDValidity, uid}
uids := c.xuidrange()
codeArg = CodeAppendUID{destUIDValidity, uids}
case "COPYUID":
c.xspace()
destUIDValidity := c.xnzuint32()