mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 02:46:37 +03:00
imapserver: implement UIDONLY extension, RFC 9586
Once clients enable this extension, commands can no longer refer to "message sequence numbers" (MSNs), but can only refer to messages with UIDs. This means both sides no longer have to carefully keep their sequence numbers in sync (error-prone), and don't have to keep track of a mapping of sequence numbers to UIDs (saves resources). With UIDONLY enabled, all FETCH responses are replaced with UIDFETCH response.
This commit is contained in:
@ -43,6 +43,7 @@ const (
|
||||
CapPreview Capability = "PREVIEW" // ../rfc/8970:114
|
||||
CapMultiSearch Capability = "MULTISEARCH" // ../rfc/7377:187
|
||||
CapNotify Capability = "NOTIFY" // ../rfc/5465:195
|
||||
CapUIDOnly Capability = "UIDONLY" // ../rfc/9586:129
|
||||
)
|
||||
|
||||
// Status is the tagged final result of a command.
|
||||
@ -261,6 +262,14 @@ type UntaggedFetch struct {
|
||||
Seq uint32
|
||||
Attrs []FetchAttr
|
||||
}
|
||||
|
||||
// UntaggedUIDFetch is like UntaggedFetch, but with UIDs instead of message
|
||||
// sequence numbers, and returned instead of regular fetch responses when UIDONLY
|
||||
// is enabled.
|
||||
type UntaggedUIDFetch struct {
|
||||
UID uint32
|
||||
Attrs []FetchAttr
|
||||
}
|
||||
type UntaggedSearch []uint32
|
||||
|
||||
// ../rfc/7162:1101
|
||||
|
Reference in New Issue
Block a user