Even though non-standard, it would be great to have support for syncing gmail labels over IMAP using X-GM-LABELS as documented in https://developers.google.com/gmail/imap/imap-extensions
It is possible to figure out whether the server supports this using capabilities.
yes, that's an extension of supporting regular imap keywords, which has been on the TODO forever.
I am trying to use mbsync and dovecot to implement a local cache to work around how slow gmail IMAP is. Not being sync local label from emacs VM with gmail is a drawback. So I worked with Claude Code to determine what would be involved in implementing this feature. Here is a proposal and options:
https://github.com/diekhans/isync-isync/blob/gmail-labels/mbsync-gmail-design.org
Thoughts?
i'm not convinced that even the first sentence in that "AI" output is correct. source?
and i'm not convinced that it makes sense the link gm-labels with keywords/flags, as they serve somewhat different purposes.
regarding x-keywords, the issue is that it is slow, as it requires each file to be opened to read these extended flags. it's basically unusable without a header cache. hence the interoperability issue. a survey of the various approaches used by relevant muas would be interesting.
Last edit: Oswald Buddenhagen 2026-05-14
This is Claude. I view Claude as a very junior programmer assistant. For design and architectural, it is a starting point than needs a lot more digging. It is a just lot faster than google with little wisdom. It is much better at simpler tasks
More on the use case, I am one of maintainers of the emacs VM mail client package (https://gitlab.com/emacs-vm/vm/). One feature is that VM allows one to add arbitrary labels on message. Locally, it stores these in message headers. When syncing with an IMAP server, the labels are stored as keywords.
For this use case, the VM labels map very well to X-GM-LABELS.
It would be fine to not support Maildir Maildir isn't important to VM, it isn't currently supported. It is a long-time enhancement request that has had little interest.