Context
The IMAP ListLabels implementation in #193 only marks INBOX as label_type = "system" — all other mailboxes are "user". Standard IMAP folders like Sent, Drafts, Trash, and Junk should also be classified as system labels for consistency with Gmail label handling.
Proposal
Use RFC 6154 special-use attributes (\Sent, \Drafts, \Trash, \Junk, \All, \Archive) to determine label type. Fall back to common folder name matching (e.g. "Sent", "Draft", "Drafts", "Trash", "Bulk Mail") for servers that don't advertise special-use attributes.
Current behavior
client.go:543-548 — only INBOX gets label_type = "system":
labelType := "user"
if item.Mailbox == "INBOX" {
labelType = "system"
}
References
Context
The IMAP
ListLabelsimplementation in #193 only marksINBOXaslabel_type = "system"— all other mailboxes are"user". Standard IMAP folders like Sent, Drafts, Trash, and Junk should also be classified as system labels for consistency with Gmail label handling.Proposal
Use RFC 6154 special-use attributes (
\Sent,\Drafts,\Trash,\Junk,\All,\Archive) to determine label type. Fall back to common folder name matching (e.g. "Sent", "Draft", "Drafts", "Trash", "Bulk Mail") for servers that don't advertise special-use attributes.Current behavior
client.go:543-548— only INBOX getslabel_type = "system":References