Email Backup and Migration using Thunderbird
2016-06-29
Imagine that you have a computer with old email that was is not available on the server, since emails was retrieved via POP3 rather than IMAP or that you want to synchronize folders between mail servers to migrate or backup mail accounts. Mozilla Thunderbird stores emails fetched via POP3 by default under Local Folders; these emails are not available on the mail server. To push your emails from any folder (local folder or a folder of an (IMAP) account) to an (IMAP) server, you could just copy the emails in Thunderbird and paste them to the desired folder on the destination email account as described here and here. In case you wish to synchronize emails between IMAP servers, you can take advantage of reliable command line tools such as imapsync instead of using your mail client. However, if you must copy a lot of emails using your mail client, it is likely that the transfer fails to complete owing to mail server time outs or other errors. As the emails might have been transferred in random order, it could take a lot of effort to manually figure out which emails are not on the server and still need to be uploaded. Again, re-uploading your emails in bulk without carefully checking the differences between the mailboxes may result in duplicates and the transfer may abort once more. In such situations, the following Thunderbird plugins help you keep your mail boxes synchronized:
The first plugin finds duplicate messages in specified folders and allows you to remove them. The second plugin enables you to export an index of your email messages in a simple text format such as CSV. In turn, using tools such diff(1) on the CSV indices of the mailboxes allows you to determine which emails need yet to be synchronized.