GithubHelp home page GithubHelp logo

fastcat / gmail-sync-labels Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hiciu/gmail-sync-labels

1.0 4.0 0.0 163 KB

script to download labels from gmail and apply them on offline copy of your messages (as additional header), and companion script to copy them to from one GMail account to another

License: Other

Python 100.00%
email backup gmail

gmail-sync-labels's Introduction

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) as header in messages.

Idea is really simple:

  1. prepare index "Message-ID header" => "message file"
  2. save index in $MAILDIR/gmail-sync-labels.index
  3. Download (message-id, labels) pairs from gmail
  4. 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_named.py
edit config_named.py
python3 gmail-sync-labels.py config_named

How to use the label restorer

The restorer currently works by copying from one gmail account to another, keying by message ID. Note that this tool is not well tested.

cp config.py.template config_old.py
cp config.py.template config_new.py
edit config_old.py config_new.py
python3 gmail-restore-labels.py config_old config_new

Similar Projects

  1. gmail-notmuch
    This project used to have NotMuch support, but it was removed for lack of maintenance.

See Also

gmail-sync-labels's People

Contributors

fastcat avatar hiciu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

gmail-sync-labels's Issues

Rename restorer to copier, add a real restorer

The "restorer" script is really a copier -- it copies labels from one account to another, instead of restoring labels from the backup. It should be renamed, and a real label restorer should be written.

Flag excess and duplicate messages during sync

When downloading labels in the sync script, it should at least have an option to warn about any messages in the maildir that are not in the gmail account. For some cases it might be good to have an option to move them to a different (trash-esque) maildir.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.