I use mbsync to synchronize several Gmail accounts to local ~/Maildir which I index and read with mu4e. This setup is amazingly fast! After the initial sync of a ~/Maildir containing 18,170 messages in 4 Gmail accounts, 'mbsync -all' takes 6 seconds (3.4 GHz server w/SSD & 30 Mbps inet). WOW!
A portion of my ~/.mbsyncrc is attached below. It includes a description of my Gmail settings and the resulting ~/Maildir folder layout. This setup produces 2 local copies of each "new" Gmail message. These are either in "All Mail" & INBOX or "ALL Mail" & "Send Mail", depending on whether Gmail received or sent the message. When I delete a message in both ~/Maildir folders and run mbsync, the message disappears from Gmail immediately. Hallelujah! Exactly what I wanted! The way I use mu4e, I don't actually need the 2nd "INBOX" or "Sent Mail" copy of each message. So I think I want to automatically delete these copies upon receipt in ~/Maildir. Can mbsync be configured to do that? TIA - George mbsync --version isync 1.3.0 ~/.mbsyncrc file: vvvvvvvvvvvvvvvvv # usage: # mbsync --all --verbose # ... or for a single channel ... # mbsync --verbose --debug cm # # With Gmail configured this way ... # # > Settings > Labels # # > System labels # Inbox X Show in Imap # Starred Show in Imap # Important Show in Imap # Chats Show in Imap # Sent Mail X Show in Imap # Drafts Show in Imap # All Mail X Show in Imap # Spam Show in Imap # Trash Show in Imap # # > Labels # <remove all labels> # # > Settings > Forwarding and POP/IMAP # # > When I mark a message in IMAP as deleted: # X Auto-Expung off # # > When a message is marked as deleted and expunged... # X Immediately delete the message forever # # ... the 'cm' config below produces a Mairdir store like ... # # /home/glc/Maildir/cm: # drwx------ 6 glc glc 4096 Dec 12 20:14 [Gmail] # drwx------ 5 glc glc 4096 Dec 12 20:13 INBOX # # /home/glc/Maildir/cm/[Gmail]: # drwx------ 5 glc glc 4096 Dec 12 20:14 All Mail # drwx------ 5 glc glc 4096 Dec 12 20:14 Sent Mail # drwx------ 5 glc glc 4096 Dec 12 20:14 Trash # # Any "new" Gmail message initially appears in two ~/Maildir folders, # either in 'cm/INBOX' + 'cm/[Gmail]/All Mail', or 'cm/[Gmail]/Sent # Mail' + 'cm/[Gmail]/All Mail'. When you delete a message from both # of the ~/Maildir folders it will be deleted from Gmail. # Gmail to ~/Maildir ###### cm START IMAPAccount cm Host imap.gmail.com User u...@gmail.com Pass PASSWORD AuthMechs LOGIN SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPStore cm-remote Account cm MaildirStore cm-local Path ~/Maildir/cm/ Inbox ~/Maildir/cm/INBOX SubFolders Verbatim Channel cm Master :cm-remote: Slave :cm-local: Patterns "*" Create Both Expunge Both SyncState * # To (re-)initialize channel cm: # mu mkdir /home/g1/Maildir/cm && mbsync --all --verbose && mu index ###### cm END ^^^^^^^^^^^^ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel