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:
- if not using notmuch:
- prepare index "Message-ID header" => "message file"
- save index in $MAILDIR/gmail-sync-labels.index
- Download (message-id, labels) pairs from gmail
- 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