Report the folder separator and special-use role so Gmail's folders are recognisable

FixEmailService
Shipped
September 5, 2026 at 6:05 AM UTC
Author
Kamo
Commit
a8818d6

A member on Google Workspace saw every one of their folders listed under "My folders" with its raw path for a label — "[Gmail]/Sent Mail", "[Gmail]/Spam" — and the "Sent" they could click was a folder that did not exist. The client cannot work out either fact for itself. IMAP's hierarchy separator is the server's to choose ("." on Dovecot, "/" on Gmail), and so is a folder's name: "Sent", "Sent Items", "[Gmail]/Sent Mail", and localised in each. The one dependable signal is the RFC 6154 SPECIAL-USE attribute in the LIST reply, which this service already reads when it appends a draft — and then dropped on the floor when it listed folders. EmailFolder now carries both. Gmail has never implemented LIST-STATUS, so every Google mailbox comes through the per-folder STATUS path; that path reports them as fully as the one-round-trip one does. The same assumption ran through the mailbox actions: delete and empty moved mail into a literal "Trash", and a spam report into a literal "Junk". On Gmail neither exists, so a delete created a stray top-level label instead of using [Gmail]/Trash. Moves now resolve a well-known name through the SPECIAL-USE lookup, exactly as GraphMailProvider already maps "Deleted Items" onto Trash — a folder that exists under the name asked for is still that folder, so a member choosing a destination gets the one they clicked.

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