Hi Sebastian,

 I also use mbsync + notmuch

 here is mbsync config for my personal Gmail mailbox:
 =====================================================
 SyncState *

 IMAPAccount [email protected]
 Host imap.gmail.com
 User [email protected]
 PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d 
~/docs/enc/cred/[email protected]"
 CertificateFile /etc/ssl/certs/ca-certificates.crt
 SSLType IMAPS

 IMAPStore [email protected]
 Account [email protected]

 MaildirStore [email protected]
 Path ~/Maildir/[email protected]/
 Inbox ~/Maildir/[email protected]/INBOX
 SubFolders Verbatim

 MaildirStore [email protected]
 Path ~/Maildir/[email protected]/

 Channel [email protected]
 Master ":[email protected]:[Gmail]/All Mail"
 Slave ":[email protected]:Archive"
 Create Slave
 SyncState *
 Sync Push Flags

 Channel [email protected]
 Master ":[email protected]:[Gmail]/Trash"
 Slave ":[email protected]:Trash"
 Create Slave
 Sync All

 Channel [email protected]
 Master ":[email protected]:[Gmail]/Drafts"
 Slave ":[email protected]:Drafts"
 Create Slave
 Sync All
 Expunge Both

 Channel [email protected]
 Master ":[email protected]:[Gmail]/Sent Mail"
 Slave ":[email protected]:Sent"
 Create Slave
 Sync All
 Expunge Both

 Channel [email protected]
 Master ":[email protected]:INBOX"
 Slave ":[email protected]:INBOX"
 Create Slave
 Sync All
 Expunge Both

 Channel [email protected]
 Master :[email protected]:
 Slave :[email protected]:
 Create Slave
 Sync All
 Patterns "*" "!Drafts" "!Sent" "!Trash" "![Gmail]*" "!INBOX" "!Lists*" "!Cron*"
 Expunge Both

 Channel [email protected]
 Master :[email protected]:
 Slave :[email protected]:
 Create Slave
 Sync All
 Patterns "Lists*" "Cron*"
 # MaxMessages 2000
 Expunge Both

 Group [email protected]
 Channel [email protected]
 Channel [email protected]
 Channel [email protected]
 Channel [email protected]
 Channel [email protected]
 Channel [email protected]
 Channel [email protected]
 =====================================================

 But I also use imapfilter for trashed and spam messages management, so
 when I delete something locally, AFAIK it correctly propagates to Gmail.

 Here is imapfilter's config:
 =====================================================
 options.timeout = 120
 options.subscribe = true

 cmd_personal = io.popen('gpg2 -q --for-your-eyes-only --no-tty -d 
~/docs/enc/cred/[email protected]', 'r')
 out_personal = cmd_personal:read('*a')
 pass_personal = string.gsub(out_personal, '[\n\r]+', '')

 account_personal = IMAP {
  server = 'imap.gmail.com',
  username = '[email protected]',
  password = pass_personal,
  ssl = 'ssl3'
  }

 trash_personal = account_personal['[Gmail]/Trash']:is_undeleted()
 account_personal['[Gmail]/Trash']:delete_messages(trash_personal)

 spam_personal = account_personal['[Gmail]/Spam']:is_unanswered()
 account_personal['[Gmail]/Spam']:delete_messages(spam_personal)
 =====================================================

 Cheers, Alex

PS Sorry for double posting, have forgot all recepients the first time.

Sebastian Fischmeister <[email protected]> writes:

> Hi,
>
> I use mbsync + notmuch to sync my gmail. The problem is that Google's
> IMAP implementation is non-standard and when I deleted a file locally,
> mbsync propagates the deletion, but gmail doesn't delete the
> message. 
>
> This is part of mbsync:
>
> SyncState *
> Sync All
> Expunge Both
> Create Both
>
> When I delete a message, the macro passes the tag 'delete'. Before
> syncing, the script runs:
>
> notmuch search --output=files tag:delete | xargs -l rm
>
> By playing with the IMAP settings in gmail, I got it so that the mail
> vanishes from the 'inbox' label, but it's still in 'All Mails'. I also
> tried moving it to a "[GMail]/Trash" folder locally and syncing that,
> but it didn't work.
>
> Any ideas?
>
>   Sebastian
> _______________________________________________
> notmuch mailing list
> [email protected]
> https://notmuchmail.org/mailman/listinfo/notmuch
_______________________________________________
notmuch mailing list
[email protected]
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to