mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
implement the imap metadata extension, rfc 5464
this allows setting per-mailbox and per-server annotations (metadata). we have a fixed maximum for total number of annotations (1000) and their total size (1000000 bytes). this size isn't held against the regular quota for simplicity. we send unsolicited metadata responses when a connection is in the idle command and a change to a metadata item is made. we currently only implement the /private/ namespace. we should implement the /shared/ namespace, for mox-global metadata annotations. only the admin should be able to configure those, probably through the config file, cli, or admin web interface. for issue #290
This commit is contained in:
@ -105,6 +105,14 @@ type ChangeMailboxKeywords struct {
|
||||
Keywords []string
|
||||
}
|
||||
|
||||
// ChangeAnnotation is sent when an annotation is added/updated/removed, either for
|
||||
// a mailbox or a global per-account annotation. The value is not included.
|
||||
type ChangeAnnotation struct {
|
||||
MailboxID int64 // Can be zero, meaning global (per-account) annotation.
|
||||
MailboxName string // Empty for global (per-account) annotation.
|
||||
Key string // Also called "entry name", e.g. "/private/comment".
|
||||
}
|
||||
|
||||
var switchboardBusy atomic.Bool
|
||||
|
||||
// Switchboard distributes changes to accounts to interested listeners. See Comm and Change.
|
||||
|
Reference in New Issue
Block a user