Provider · Gmail
Gmail mailbox migration
Gmail hands over the whole mailbox through IMAP, but it is not a normal mailbox underneath: what looks like folders are labels, and one message carrying three labels arrives at the new server three times. Below are the connection settings, the traps that make a migration take three times longer than expected, and the destinations people leave Gmail for most often.
Connection settings
The form fills these in for you as soon as you pick the provider.
- IMAP server
- imap.gmail.com
- Port
- 993 · SSL/TLS
- Username
- the full email address
- Password
- an app password
What breaks a migration here specifically
- The "[Gmail]/All Mail" folder holds a copy of every message from every other folder. Leave it selected and the transfer roughly doubles in size, and the new mailbox ends up with duplicates.
- IMAP will not take the account password: you need an app password, and Google issues those only when 2-step verification is on.
- Gmail labels are not folders. A message with two labels lands in two destination folders, so the final count is higher than the number Gmail shows you.
- Uploading into Gmail is noticeably slower than downloading out of it: the receiving side is throttled harder, so plan extra time for migrations that end in Gmail.
Where mailboxes go from here
Ready pages with the settings for both sides and the order of steps.
FAQ
Common questions
Do I need to enable IMAP in Gmail first?
Yes — in the Gmail web interface: Settings → Forwarding and POP/IMAP → Enable IMAP. Without it no client can connect, ours included.
Will the mail stay in Gmail after the migration?
Yes. The default mode only copies and never deletes anything at the source. Deletion happens only in strict mirror mode, only on the destination, and only after two explicit confirmations.
Where do I get an app password?
In the security settings of your Google account, once 2-step verification is enabled. It is 16 characters used instead of the normal password, and you can revoke it in one click when the migration is done.
What about Spam and Trash?
Usually they are not worth moving: they cost space and time. Just clear their checkboxes in the folder list.
Find out how big your mailbox is. It costs nothing.
Connect two servers, look at the size and decide. Or take the client and keep everything on your side.
Code on GitHub · built on imapsync · no sign-up