My institution recently reshuffled our email accounts. I'm forced to shift years worth of carefully currated email (= more chaos than a 3 year old's birthday party) from IMAP account_old to IMAP account_new which differ only in server names as far as I can tell.
Being IMAP, all my mail is held locally besides on the mail server, so I thought Thunderbird might allow me to create the IMAP account_new and then push the contents of my ~/.thunderbird
profile onto the account_new IMAP server. Note also that the IMAP account_old is now offline.
My google searching has returned nothing on this approach and instead users appear to have to laboriously copy mail (by right clicking on folder > Copy To > relative/thunderbird/path), folder by folder, from one account to another. I was doing this until I discovered that, at some point, the attachments stopped being copied across correctly (but they were when I started the process). Specifically, the attachment file container is copied, but the contents appear absent since an error* is returned when attempting to open it. Same issue occurs using Move To on individual mail items. Right now I'm wondering if DavMail (for the Exchange account I use) is interfering with the copying of attachments using this approach.
* This attachment appears to be empty.
Please check with the person who sent this.
Often company firewalls or antivirus programs will destroy attachments.
No less, I'd like to know if there isn't a more robust and less labor intensive way to upload the entire local contents of an account to an IMAP server, with complete tree structure and metadata (fwd, reply, tags etc)? I'm using Thunderbird v17.0 on Ubuntu 12.04, 64bit, DavMail 4.1.0.
EDIT: I see imapsync should do the job. Any comments on this approach, i.e. are the metadata and attachments faithfully synced?
Best Answer
An alternative is to use mbsync from the isync project. Here is some example configuration for syncing mail from one IMAP server directly to another:
You can then run
mbsync -l transfer
to list which mail folders will be synchronized.To actually run the transfer, run
mbsync transfer
. The nice thing about this is that you can run that periodically and it will do an efficient sync.Further notes:
PassCmd
to use a different method of getting the password (e.g. from a token ring).Slave ":imap-dest:parent-folder/"
in theChannel
configuration.