mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 02:46:37 +03:00
Implement IMAP REPLACE extension, RFC 8508.
REPLACE can be used to update draft messages as you are editing. Instead of requiring an APPEND and STORE of \Deleted and EXPUNGE. REPLACE works atomically. It has a syntax similar to APPEND, just allows you to specify the message to replace that's in the currently selected mailbox. The regular REPLACE-command works on a message sequence number, the UID REPLACE commands on a uid. The destination mailbox, of the updated message, can be different. For example to move a draft message from the Drafts folder to the Sent folder. We have to do quite some bookkeeping, e.g. for updating (message) counts for the mailbox, checking quota, un/retraining the junk filter. During a synchronizing literal, we check the parameters early and reject if the replace would fail (eg over quota, bad destination mailbox).
This commit is contained in:
@ -39,6 +39,7 @@ const (
|
||||
CapCompressDeflate Capability = "COMPRESS=DEFLATE" // ../rfc/4978:65
|
||||
CapListMetadata Capability = "LIST-METADTA" // ../rfc/9590:73
|
||||
CapMultiAppend Capability = "MULTIAPPEND" // ../rfc/3502:33
|
||||
CapReplace Capability = "REPLACE" // ../rfc/8508:155
|
||||
)
|
||||
|
||||
// Status is the tagged final result of a command.
|
||||
|
Reference in New Issue
Block a user