diff --git a/README.md b/README.md index 203a353..96a14d1 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ https://nlnet.nl/project/Mox/. - "mox setup" command, with webapp for interactive setup - Automate DNS management, for setup and maintenance, such as DANE/DKIM key rotation. - Calendaring with CalDAV/iCal -- More IMAP extensions (PREVIEW, IMPORTANT, COMPRESS=DEFLATE, UNAUTHENTICATE, +- More IMAP extensions (PREVIEW, COMPRESS=DEFLATE, UNAUTHENTICATE, REPLACE, QUOTA, NOTIFY, MULTIAPPEND, OBJECTID, MULTISEARCH, THREAD, SORT) - Introbox, to which first-time senders are delivered - ARC, with forwarded email from trusted source diff --git a/imapclient/cmds.go b/imapclient/cmds.go index e951fd1..c5495f9 100644 --- a/imapclient/cmds.go +++ b/imapclient/cmds.go @@ -150,7 +150,7 @@ func (c *Conn) Examine(mailbox string) (untagged []Untagged, result Result, rerr // Create makes a new mailbox on the server. // SpecialUse can only be used on servers that announced the CREATE-SPECIAL-USE -// capability. Specify flags like \Archive, \Draft, \Junk, \Sent, \Trash, \All. +// capability. Specify flags like \Archive, \Drafts, \Junk, \Sent, \Trash, \All. func (c *Conn) Create(mailbox string, specialUse []string) (untagged []Untagged, result Result, rerr error) { defer c.recover(&rerr) if _, ok := c.CapAvailable[CapCreateSpecialUse]; !ok && len(specialUse) > 0 { diff --git a/imapserver/list.go b/imapserver/list.go index b8535ed..3754419 100644 --- a/imapserver/list.go +++ b/imapserver/list.go @@ -191,21 +191,17 @@ func (c *conn) cmdList(tag, cmd string, p *parser) { flags = append(flags, bare(`\Subscribed`)) } if info.mailbox != nil { - if info.mailbox.Archive { - flags = append(flags, bare(`\Archive`)) - } - if info.mailbox.Draft { - flags = append(flags, bare(`\Drafts`)) - } - if info.mailbox.Junk { - flags = append(flags, bare(`\Junk`)) - } - if info.mailbox.Sent { - flags = append(flags, bare(`\Sent`)) - } - if info.mailbox.Trash { - flags = append(flags, bare(`\Trash`)) + add := func(b bool, v string) { + if b { + flags = append(flags, bare(v)) + } } + mb := info.mailbox + add(mb.Archive, `\Archive`) + add(mb.Draft, `\Drafts`) + add(mb.Junk, `\Junk`) + add(mb.Sent, `\Sent`) + add(mb.Trash, `\Trash`) } var extStr string diff --git a/rfc/index.txt b/rfc/index.txt index cbd7923..ae835c4 100644 --- a/rfc/index.txt +++ b/rfc/index.txt @@ -229,7 +229,7 @@ https://www.iana.org/assignments/message-headers/message-headers.xhtml 8437 Roadmap - IMAP UNAUTHENTICATE Extension for Connection Reuse 8438 Yes - IMAP Extension for STATUS=SIZE 8440 ? - IMAP4 Extension for Returning MYRIGHTS Information in Extended LIST -8457 Roadmap - IMAP "$Important" Keyword and "\Important" Special-Use Attribute +8457 No - IMAP "$Important" Keyword and "\Important" Special-Use Attribute 8474 Roadmap - IMAP Extension for Object Identifiers 8508 Roadmap - IMAP REPLACE Extension 8514 Yes - Internet Message Access Protocol (IMAP) - SAVEDATE Extension diff --git a/store/account.go b/store/account.go index 15b284a..0f91d19 100644 --- a/store/account.go +++ b/store/account.go @@ -272,7 +272,7 @@ func (mc *MailboxCounts) Sub(delta MailboxCounts) { // understand where messages should go. type SpecialUse struct { Archive bool - Draft bool + Draft bool // "Drafts" Junk bool Sent bool Trash bool diff --git a/webmail/api.json b/webmail/api.json index 429ad46..45b1f27 100644 --- a/webmail/api.json +++ b/webmail/api.json @@ -1631,7 +1631,7 @@ }, { "Name": "Draft", - "Docs": "", + "Docs": "\"Drafts\"", "Typewords": [ "bool" ] @@ -3120,7 +3120,7 @@ }, { "Name": "Draft", - "Docs": "", + "Docs": "\"Drafts\"", "Typewords": [ "bool" ] diff --git a/webmail/api.ts b/webmail/api.ts index 48503fa..1b8f24a 100644 --- a/webmail/api.ts +++ b/webmail/api.ts @@ -192,7 +192,7 @@ export interface Mailbox { UIDValidity: number // If UIDs are invalidated, e.g. when renaming a mailbox to a previously existing name, UIDValidity must be changed. Used by IMAP for synchronization. UIDNext: UID // UID likely to be assigned to next message. Used by IMAP to detect messages delivered to a mailbox. Archive: boolean - Draft: boolean + Draft: boolean // "Drafts" Junk: boolean Sent: boolean Trash: boolean @@ -498,7 +498,7 @@ export interface ChangeMailboxSpecialUse { // understand where messages should go. export interface SpecialUse { Archive: boolean - Draft: boolean + Draft: boolean // "Drafts" Junk: boolean Sent: boolean Trash: boolean