Mbsync not fetching/pushing with [Gmail]/Folders

emailimap

I've switched from offlineimap to mbsync, but I'm having a problem
syncing certain directories from Gmail. Specifically, all of the
[Gmail]/FolderName directories seem to be ignored by mbsync (when I run
mbsync -l, it doesn't list any of these).

I have a config like this [edited to show full config]:

Create Slave

# Account details necessary for logging into the remove server:
IMAPAccount GMAIL
Host imap.gmail.com
User user@gmail.com
Pass pass
UseIMAPS yes
# The certificate of the authority that verified the SSL
# certificate of your email provider:
CertificateFile /etc/ssl/certs/ca-certificates.crt

# The remote repository:
IMAPStore GMAIL-remote
Account GMAIL

# The local repository:
MaildirStore GMAIL-local
Path ~/Maildir/GMAIL/
Inbox ~/Maildir/GMAIL/INBOX
Trash ~/Maildir/GMAIL/[Gmail].Bin

# Channel connecting two repositories, describing the way the two
# are synchronized:
Channel GMAIL
Master :GMAIL-remote:
Slave :GMAIL-local:
Patterns  "[Gmail]/Sent Mail" "[Gmail]/Drafts" "[Gmail]/Bin" "[Gmail]/Spam" INBOX ARCHIVED
Create Slave
Expunge Both
SyncState * 

Which seems to conform to examples I've seen online.

Has something changed with mbsync or Gmail which causes mbsync to ignore [Gmail]/Folders?

Best Answer

The project is called isync. According to the ArchLinux Wiki there are supposedly problems with mbsync and GMail. There is a message suggesting that you use isync-git instead.

excerpt

isync can be installed from the AUR. Some problems have been reported when using GMail with the 1.0.6 version. In this case, you can try isync-git.

I also found this thread, seems a bit old at 2008, so things might be different. The thread, titled: Re: Subfolders and Hierarchies. According to the thread, [mbsync] doesn't support GMail and subfolders.

I'm very much interested in using mbsync and mswatch. I currently use a ~/Maildir that is INBOX and also contains ~/Maildir/.foo.bar style maildirs. I've read that mbsync has problems with hierarchies and I've read comments telling me to read the list archives, but so far I can't make sense of it. :) I'm happy to change my usage patterns, I'm just not sure what to do to get the ~/Maildir/.foo.bar maildirs synced. Can anyone help make this clearer

what you want is not supported. you may try specifying each mailbox separately, both on the client and the server and connect them, one per channel, and then put them into a group.

This thread also looks to touch on the issues you're having with subfolders too, titled: offlineimap or mbsync?.

Compiling isync

The OP was attempting to install/compile this on an Ubuntu based system. To compile it you'll need to install the Berkley Data Base (BDB 4.2+). You need to install the library headers for this package, and it needs to be a version that is at 4.2 or higher.

$ sudo apt-get install libdb5.3++-dev libdb5.3-dev
Related Question