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
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.
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.