"Seen" tag not getting synchronized

Arjun arjunkc at gmail.com
Sun Jul 26 02:08:13 BST 2020


Hi

I have offlineimap syncing a gmail repository that I then use notmuch on. Lately,
offlineimap has been deleting the S (Seen) flags from my gmail maildir once I change them on the maildir file using notmuch. I am running offlineimap 7.3.3.

Here is my sanitized offlineimap conf

    #### Account name ####
    [Account gmail-name]
    localrepository = gmail-name-local
    remoterepository = gmail-name-remote
    maxage=300
    autorefresh = 10
    synclabels = yes
    labelsheader = X-Keywords
    ignorelabels = \Important
    presynchook = UMASK=007 /usr/local/bin/afew --move-mails
    postsynchook = UMASK=007 notmuch new && UMASK=007 /usr/local/bin/afew --tag --new

    #### Local repository: gmail-name-local ##############
    [Repository gmail-name-local]
    # OfflineIMAP supports Maildir, GmailMaildir, and IMAP for local repositories.
    type = GmailMaildir
    # Where should the mail be placed?
    localfolders = /mnt/mail/offline-imap/gmail-name
    # sep = .
    # startdate = DO NOT USE. See offlineimap.conf
    # Propagate deletions from local to remote. Messages deleted in this repository
    # won't get deleted on remote if set to "no". Default is yes.
    # See sync_deletes in the RemoteExample section, too.
    sync_deletes = yes
    nametrans = lambda f: '[Gmail]/' + f if f in ['Drafts', 'Chats', 'Starred', 'Important', 'Spam', 'Trash', 'All Mail', 'Sent Mail'] else f

My notmuch config looks like this

    database.path=/mnt/mail/offline-imap/
    user.name=name
    user.primary_email=name at gmail.com
    new.tags=new;
    new.ignore=.sync
    search.exclude_tags=spam;
    maildir.synchronize_flags=true
    muchsync.and_tags=inbox;unread;new
    built_with.compact=true
    built_with.field_processor=true
    built_with.retry_lock=true

Any idea what's going on here? I update tags on notmuch, it sets the S flag on the maildir file. Then when offlineimap is run, it looks like this

    2020-07-25 12:03:24 INFO: Syncing [Gmail]/Chats: Gmail -> GmailMaildir
    2020-07-25 12:03:25 INFO: Syncing [Gmail]/Drafts: Gmail -> GmailMaildir
    2020-07-25 12:03:27 INFO: Syncing INBOX: Gmail -> GmailMaildir
    2020-07-25 12:03:30 INFO: Deleting flag S from 2 messages on INBOX
    2020-07-25 12:03:30 INFO: Syncing Jobs: Gmail -> GmailMaildir
    2020-07-25 12:03:31 INFO: Syncing Mailing lists and newsletters: Gmail -> GmailMaildir

I'd appreciate any help.

Arjun



More information about the OfflineIMAP-project mailing list