Give every provider's folder tree the same shape before any client sees it

FeatureEmailService
Shipped
September 5, 2026 at 7:30 AM UTC
Author
Kamo
Commit
eabaec5

Reporting a folder's SPECIAL-USE attribute was not enough, because a server only sends one if it is configured to — and the KamoMail Dovecot in production sends none at all: its listing answers role:null for Sent, Trash and Junk alike. So a Google mailbox still showed "[Gmail]" among the member's own folders with their real Sent buried inside it, and an empty "Sent" pinned above pointing at a folder Gmail does not have. FolderRoleMapper settles each role from, in order: the attribute the server sent, which is the only source that knows a localised "Gesendet" is the Sent folder; the paths this provider is known to use; and the folder's own leaf name, which is where every server without SPECIAL-USE ends up and is exactly what the client used to do for itself. A role is claimed once, so a member's own "Sent" on Gmail cannot take the slot from [Gmail]/Sent Mail. It also marks the containers a provider wraps its folders in — [Gmail] and [Google Mail] — as hidden. They are still listed, because their children name them as their parent, but no client shows them. Adding a provider is adding a row to the map rather than another branch in a component, and both the member's own mailbox and a shared one go through it.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing