I've ended up with channel per folder approach.
Also, syncing gmail-trash first is important.
It does kills all local copies of deleted mail.

Sync All
Expunge Both

IMAPStore gmail-remote
Host imap.gmail.com
User [email protected]
Pass %%PASSWORD_HERE%%
UseIMAPS yes
RequireSSL yes
CertificateFile /etc/ssl/certs/ca-certificates.crt

MaildirStore gmail-local
Path ~/.mail/
Inbox ~/.mail/INBOX

Channel gmail-inbox
Master ":gmail-remote:INBOX"
Slave ":gmail-local:INBOX"
Create Both
SyncState *

Channel gmail-lists
Master ":gmail-remote:lists"
Slave ":gmail-local:lists"
Create Both
SyncState *

Channel gmail-archive
Master ":gmail-remote:[Gmail]/All Mail"
Slave ":gmail-local:archive"
Create Both
SyncState *

Channel gmail-drafts
Master ":gmail-remote:[Gmail]/Drafts"
Slave ":gmail-local:drafts"
Create Both
SyncState *

Channel gmail-sent
Master ":gmail-remote:[Gmail]/Sent Mail"
Slave ":gmail-local:sent"
Create Both
SyncState *

Channel gmail-flagged
Master ":gmail-remote:[Gmail]/Starred"
Slave ":gmail-local:flagged"
Create Both
SyncState *

Channel gmail-trash
Master ":gmail-remote:[Gmail]/Trash"
Slave ":gmail-local:trash"
Create Both
SyncState *

Group gmail
Channel gmail-trash
Channel gmail-inbox
Channel gmail-lists
Channel gmail-drafts
Channel gmail-sent
Channel gmail-flagged
Channel gmail-archive

On 11/12, Benjamin Slade wrote:
> I'm trying to replace offlineimap in my setup (with mu4e) with
> mbsync/isync, but I'm running into some problems.
> 
> Here is my basic current config:
> 
> ==============
> 
> Create Slave
> 
> # Account details necessary for logging into the remove server:
> IMAPAccount GMAIL
> Host imap.gmail.com
> User [email protected]
> 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 [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 *
> 
> =================
> 
> When I used this with the version of mbsync which is in the Ubuntu 13.10
> repositories, it worked EXCEPT it does not sync any of the [Gmail]/Folders
> like [Gmail]/Sent Mail, no matter what I change the "Pattern" to (including
> just *).
> 
> I ran into several sources online which suggested that the version from the
> git repositories might work better for Gmail. I compiled the version from
> the Git repo (mbsync -v reports "isync 1.1.0"), but now I'm running into a
> different problem:
> 
> (1) If I run mbsync (from the git repo) with the above config, it complains
> that "unknown/misplaced keyword 'CertificateFile'".
> (2)  If I get rid of the CertificateFile line from .mbsyncrc, mbsync
> reports that it's connecting to Gmail and opening up the slave, but doesn't
> get any further (it just indefinitely sits there).
> 
> Can anyone point me in the right direction for getting mbsync running with
> Gmail, such that I can pull [Gmail]/Drafts, [Gmail]/Bin, [Gmail]/Sent Mail,
> [Gmail]/Spam?

> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk

> _______________________________________________
> isync-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/isync-devel


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to