(no longer maintained) script to download labels from gmail and apply them on offline copy of your messages (as additional header or as tags in notmuch database)
Switch branches/tags
Nothing to show
Failed to load latest commit information.


This project is no longer maintained.

How this is supposed to work

This script should download message labels from gmail and apply them on local copy of that messages (made with getmail or other software) either as tags in notmuch database (notmuch, the mail indexer, something like offline gmail in shell) or as header in messages.

Idea is really simple:

  1. if not using notmuch:
    1. prepare index "Message-ID header" => "message file"
    2. save index in $MAILDIR/gmail-sync-labels.index
  2. Download (message-id, labels) pairs from gmail
  3. Apply labels on message with message-id

How to use this

before: make backup of your Maildir. It works for me, but it may destroy mails for you. It was tested with python 3.3, it may or may not work with older releases. Feel free to post patches / pull requests / issues about older versions.

cp config.py.template config.py
edit config.py
python3 gmail-sync-labels.py

Similar projects

  1. gmail-notmuch