I'm able to sync my Gmail inbox, but the sent folder does not work.
This is my .mbsyncrc
IMAPStore martinstabenfeldt-remote
Account martinstabenfeldt
MaildirStore martinstabenfeldt-local
Path ~/.mail/martinstabenfeldt/
INBOX ~/.mail/martinstabenfeldt/INBOX
Channel martinstabenfeldt
Master :martinstabenfeldt-remote:
Slave :martinstabenfeldt-local:
Patterns *
# Automatically create missing mailboxes, both locally and on the server
Create Both
# Save the synchronization state files in the relevant directory
SyncState *
Channel martinstabenfeldt-inbox
Master ":martinstabenfeldt-remote:INBOX"
Slave ":martinstabenfeldt-local:INBOX"
Channel martinstabenfeldt-sent
Master ":martinstabenfeldt-remote:[Gmail]/Sent Mail"
Slave ":martinstabenfeldt-local:sent"
This is the error I get:
$ mbsync --verbose martinstabenfeldt-sent
Logging in...
Opening master box [Gmail]/Sent Mail...
Opening slave box sent...
Error: channel martinstabenfeldt-sent: slave sent cannot be opened.
C: 1/1 B: 1/1 M: +0/0 *0/0 #0/0 S: +0/0 *0/0 #0/0
Any idea why this fails? I've created the ~/.mail/martinstabenfeldt/sent folder. And this folder is empty.
Try Using [Google Mail] instead of [Gmail]. It should work. I believe there is Starred, Spam, Sent Mail, Important, Drafts, Bin and All Mail that will work with [Google Mail]/.
Here is my config file:
If you still have issues you could try the following config:
Once you have this run the following command: mbsync -Dmn gmail
You should see some output:
From here you can see what your respective remote folder names should be.