Moving a mailbox in
You arrive with ten years of mail elsewhere: it comes in here, with its dates, its folders and what you had already read. The job is done with imapsync, the standard tool of the trade, which speaks to any IMAP mailbox.
1. Open a migration window
On suite.simafri.com, Mail settings, Move a mailbox in section, click Open a migration.
For twenty-four hours, your other account can pour its mail into this mailbox; the window then closes on its own. That door, opened by you and for a set time, is what tells a genuine history apart from a manufactured message.
The screen counts the messages coming in as they arrive, keeps the trail of every past window, and lets you close it early.
2. Create the password and do a dry run
Use the password of the destination mailbox, or create an application password in Mail software (how to). The user name is the address of the destination mailbox.
Start with a folder survey, which writes nothing:
imapsync --dry --justfolders \
--host1 imap.gmail.com --port1 993 --ssl1 --user1 you@gmail.com \
--host2 imap.simafri.com --port2 993 --ssl2 --user2 you@yourdomain.tld
3. Map the folders
A Simafri Suite mailbox carries six folders of its own, INBOX, Sent, Drafts, Spam, Trash and Archive, and welcomes all of yours: imapsync recreates them as they are, under their names and in their tree.
Three principles are enough to read the dry run's output:
- your provider's special folders (sent, trash, junk) get a
--f1f2onto one of the six, by the names it shows:--f1f2 "Sent Items=Sent",--f1f2 "Deleted Items=Trash",--f1f2 "Junk=Spam"; - your folders cross as they are, with nothing to declare;
- whatever is only a second view of the same mail stays aside. At Gmail,
All Mail,StarredandImportantare views: including them would bring every message in twice and file conversations where you are not expecting them.
If the dry run shows your folders under INBOX/, as some hosts file them, add --regextrans2 's,^INBOX/,,': they arrive at the root, next to the Inbox.
Your source's drafts folder stays aside as well.
4. Run the migration
imapsync \
--host1 imap.gmail.com --port1 993 --ssl1 --user1 you@gmail.com \
--host2 imap.simafri.com --port2 993 --ssl2 --user2 you@yourdomain.tld \
--exclude "^\[Gmail\]/All Mail$" --exclude "^\[Gmail\]/Drafts$" \
--exclude "^\[Gmail\]/Starred$" --exclude "^\[Gmail\]/Important$" \
--f1f2 "[Gmail]/Sent Mail=Sent" --f1f2 "[Gmail]/Trash=Trash" --f1f2 "[Gmail]/Spam=Spam"
From a classic host (cPanel, DirectAdmin, Plesk), the same command, the special folders named as the dry run showed them:
imapsync \
--host1 mail.previous-host.tld --port1 993 --ssl1 --user1 you@yourdomain.tld \
--host2 imap.simafri.com --port2 993 --ssl2 --user2 you@yourdomain.tld \
--folderlast INBOX --f1f2 "INBOX.Sent=Sent" --f1f2 "INBOX.Trash=Trash" --f1f2 "INBOX.Junk=Spam" --exclude "^INBOX.Drafts$"
Budget the time from the number of messages, not from their weight: around 0.8 messages per second, whatever their size. A mailbox of 50,000 messages therefore takes on the order of seventeen hours, and you will reopen the window along the way.
Stopping and running the same command again is expected: what is already in is recognised and does not come in twice. The screen shows both numbers, messages that came in and messages already there.
If the account's plan is reached along the way, the migration stops there and says so. Move up a plan, run the same command again, and it picks up where it left off.
What crosses over
| The whole message, headers, formatting and attachments | yes, to the byte |
| The original arrival date | yes, and it is what sorts the thread |
| Read or unread | yes, for the person running the migration |
| The folder: inbox, sent, archive, trash, spam, and all your folders | yes, with their tree |
| Conversations | rebuilt from the headers, as they are for today's mail |
Run the tool in its default order, oldest message first: that is how exchanges are put back together whole.
A conversation whose messages were filed in several of your folders is filed in the folder of its most recent message, and the migration screen gives their number. A conversation one of whose messages was still in your Inbox stays there, filed in its folder at the same time.
Leaving with your mailbox
The same command, the other way round, takes your mail out to any IMAP provider. Nothing has to be opened or asked for: the mailbox password, or an application password, is enough, and reading stays open whatever happens.
imapsync \
--host1 imap.simafri.com --port1 993 --ssl1 --user1 you@yourdomain.tld \
--host2 imap.other-provider.tld --port2 993 --ssl2 --user2 you@other-provider.tld
A hand with it
Write to support@simafri.com with the name of your current provider and the rough size of the mailbox: we will help you with the folder mapping and the command to run.