emaildata-migrationthunderbirddovecotmaildir

migrate from Thunderbird to Maildir


I am using Thunderbird for more than 10 years and did always load my mails via POP3 from the server, so now I have thousands of old mails stored locally. The mail-server I used all this years is managed by a friend on his machine.

But I am managing my own webserver on my own machine for some years and I thought it would be nice to have all my mails stored on that server to access them via IMAP from where ever I want. So this week I installed postfix and dovecot on my remote machine, and now I want to migrate my old local mails to the new remote server-machine.

How can this be done?

I thought I copy the thunderbird-folder from my local machine (an iMac) to the server (Ubuntu 14.04) and then start a program that converts this data into dovecot's maildir format. But I don't find a program that promises to do this job.

This is the folder-structure of Thunderbird (the source) on my iMac (OS X is a unix-clone like linux):

/Users/hubert/Library/Thunderbird/
/Users/hubert/Library/Thunderbird/profiles.ini
/Users/hubert/Library/Thunderbird/Crash Reports/    (content not listed here)
/Users/hubert/Library/Thunderbird/Profiles/
/Users/hubert/Library/Thunderbird/Profiles/5dbq1dv5.default/   (contains about 300 objects, some of them folders with sub-folders)

This is the folder-structure on the server (the target) after sending and receiving some test-mails:

/var/vmail/
/var/vmail/somedomain.tld/
/var/vmail/somedomain.tld/alice/
/var/vmail/somedomain.tld/alice/Maildir/
/var/vmail/somedomain.tld/alice/Maildir/.Sent/
/var/vmail/somedomain.tld/alice/Maildir/.Sent/cur/
/var/vmail/somedomain.tld/alice/Maildir/.Sent/cur/1409927006.M639655P25883.km20118-01,S=573,W=590:2,S
/var/vmail/somedomain.tld/alice/Maildir/.Sent/cur/1409927148.M158894P26271.km20118-01,S=383,W=395:2,S
(some more mails with similar names)
/var/vmail/somedomain.tld/alice/Maildir/.Sent/new/   (empty folder)
/var/vmail/somedomain.tld/alice/Maildir/.Sent/tmp/   (empty folder)
/var/vmail/somedomain.tld/alice/Maildir/.Sent/dovecot-uidlist
/var/vmail/somedomain.tld/alice/Maildir/.Sent/dovecot.index.cache
/var/vmail/somedomain.tld/alice/Maildir/.Sent/dovecot.index.log
/var/vmail/somedomain.tld/alice/Maildir/.Sent/maildirfolder
/var/vmail/somedomain.tld/alice/Maildir/cur/   (contains some mails)
/var/vmail/somedomain.tld/alice/Maildir/new/   (empty folder)
/var/vmail/somedomain.tld/alice/Maildir/tmp/   (empty folder)
/var/vmail/somedomain.tld/alice/Maildir/dovecot-uidlist
/var/vmail/somedomain.tld/alice/Maildir/dovecot-uidvalidity
/var/vmail/somedomain.tld/alice/Maildir/dovecot-uidvalidity.54096df6
/var/vmail/somedomain.tld/alice/Maildir/dovecot.index.cache
/var/vmail/somedomain.tld/alice/Maildir/dovecot.index.log
/var/vmail/somedomain.tld/alice/Maildir/dovecot.mailbox.log
/var/vmail/somedomain.tld/alice/Maildir/maildirfolder
/var/vmail/somedomain.tld/alice/Maildir/subscriptions
/var/vmail/somedomain.tld/alice/Maildir/
/var/vmail/somedomain.tld/bob/
/var/vmail/somedomain.tld/bob/Maildir/   (same structure as in alice/Maildir/)
/var/vmail/otherdomain.tld/   (same structure as in somedomain/)

There is an add-on named "ImportExortTools" for Thunderbird, but when I export my mails I don't get the Maildir-structure. I don't know how to convert this into maildir format.

Does dovecot have a tool that imports what ImportExortTools did produce?


Solution

  • Don't care for Thunderbird and its data structures.

    Just configure and set up the IMAP server in Thunderbird, then move all local folders/mails to the IMAP server (by drag'n'drop).

    The IMAP server will take care for its own data structures - which will be maildir in your case if you configured it that way.