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

@ -1532,10 +1532,10 @@ func (a *Account) WithRLock(fn func()) {
//
// If the destination mailbox has the Sent special-use flag, the message is parsed
// for its recipients (to/cc/bcc). Their domains are added to Recipients for use in
// dmarc reputation.
// reputation classification.
//
// If sync is true, the message file and its directory are synced. Should be true
// for regular mail delivery, but can be false when importing many messages.
// If sync is true, the message file and its directory will be synced. Should be
// true for regular mail delivery, but can be false when importing many messages.
//
// If updateDiskUsage is true, the account total message size (for quota) is
// updated. Callers must check if a message can be added within quota before