Giter Site home page Giter Site logo

thunderbird-account-copy's Introduction

Thunderbird Account Copy

A Thunderbird plugin for copying data between mail accounts.

Note: Before using, please read the Limitations and Warnings section.

This extension allows the following data to be copied between two Thunderbird accounts:

  1. Message Filters
  2. Folders
  3. Messages

This version of TBAC is useful mainly to duplicate messages and filters into an empty account, such as when changing email providers. A future version may handle update-style copies, for example to maintain the same set of filters in multiple accounts by editing them in one place and copying them to others incrementally.

Messages are copied as a consequence of copying folder structures. When copying folders, TBAC replicates the source account folder tree in the destination account, using any same-name folders already there and not deleting any existing folders. New messages and filter rules appear along with any existing messages and filter rules; nothing is deleted.

Installation

To install, download the latest release from Github, and install the extension through the add-on manager. Alternatively, you can clone these sources and select the manifest file from Thunderbird.

More information can be found at the following link:

https://developer.thunderbird.net/add-ons/hello-world-add-on#installing

Usage

Once installed, the TBAC icon will appear on your toolbar. Clicking on it brings up the extension tab, where you can start copying between accounts. This extension is written to work in a "wizard" style and is relatively straightforward. Clicking "Start" commences the first copy process. Clicking "Continue" starts the second.

Before copying any filters or folders, you will be warned about potential conflicts.

Message Filters

The first step in the copy process is to copy message filters (unless skipped). Message filters are considered to be in conflict if both of the following are true:

  1. The destination account has a message filter with the same name.
  2. The matching destination message filter has the same rules as the filter to be copied.

Filters that have the same name but different conditions are not currently treated as conflicts. Once all the filters have been copied, you will receive a message indicating the operation was successful.

Message Folders

The next step in the process is copying message folders (unless skipped).

Duplicating a folder name at the same tree position is not possible, so this extension merges instead of copying folders that already exist.

Conflicts between messages are currently not displayed, as an inbox can have as many as 100,000 messages. Depending on where messages are stored (server or local) and how many messages there are, it may take considerable time for copying to complete.

You should allow the copying process to continue even if it appears hung, unless you strongly suspect something has gone wrong. Interrupting the process is not dangerous per se, but you may end up with partially copied data. A subsequent copy would re-copy all already-copied messages, unless you first delete everything that was initially copied.

Once the operation is complete, the extension displays a success message.

Hiding TBAC Icon

If you want to hide the extension's icon from your toolbar, you can right click on an empty space on the toolbar and select "Customize". Drag the icon onto the dialog that pops up or do the reverse to restore the icon. More info is here:

https://support.mozilla.org/en-US/kb/how-customize-toolbars#

Limitations and Warnings

Back Up Your Profile

Before using this extension, ensure you have made a backup of your profile folder (see: https://support.mozilla.org/en-US/kb/profiles-where-thunderbird-stores-user-data#w_backing-up-a-profile). Copying of accounts is more or less a one-way operation and there is no support for undoing a copy. You will have to delete the copied filters, messages, and folders yourself, or ideally restore your profile from a backup. Once you are happy with the copy, you can delete the backup, if you wish.

Conflicts

When conflicts are encountered, TBAC gives you two options:

  1. Cancel copying.
  2. Continue copying including the conflicting data.

If you choose 1, be aware that the previous step (copying message filters) will not be undone. If you chose to continue, keep in mind that:

For message filters, duplicate message filters will appear in the destination account's message filter dialog, which may not be desirable if you have a lot filters.

Folders will be merged; however, the messages in the destination will then be duplicated.

License

Apache 2.0 + MIT

thunderbird-account-copy's People

Contributors

joeharr4 avatar metasansana avatar

Watchers

 avatar  avatar  avatar

Forkers

joeharr4

thunderbird-account-copy's Issues

Support copying filters between accounts.

This issues serves as a meta issue for all the tasks needed to implement filter copying.

As far as I am aware and can tell. Filters are stored on the local machine in the msgFilterRules.dat file. It's a little confusing whether filters are associated to folders/identities/accounts but code such as this suggest they are tied to the nsIMsgIncomingServer of an nsIMsgAccount. This is also evident by the file location on the file system.

Everywhere I searched for the property canHaveFilters, it seems to be set to true, so I'm pretty confident they are only stored locally.
https://searchfox.org/comm-central/search?q=canHaveFilters%7Cm_canhaveFilters&path=&case=true&regexp=true

A quick win is to probably copy the msgFilterRules.dat file between accounts but we are interested in detecting collisions here so I'll look further into using the internal APIs so we can easily detect what's being overwritten.

The following tasks need to be complete to close this issue (more will be added as we progress).

Establish extension base UI and chrome integration.

The purpose of this extension is to allow the following types of data to be copied between mail accounts:

  1. Tags
  2. Mail Messages
  3. Message Filters

The workflow I envision for this is a single tab containing a wizard the user steps through to configure and start the copy. The copy process itself will be executed via a background script.

The diagram below gives an idea of the workflow from a user's perspective.

workflow

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.