Skip to content

Migrating email without losing everything

General Discussion by tomhider 2 replies 95 views
14 #1

So I moved my stuff from one cpanel to another usign imapsync, figured id write it down befoer I forget

Teh basic idea: sync mailboxes FIRST, then flip DNS, then sync again for stragglers

What u need
- imapsync (perl script, runs evrywhere pretty much)
- old server still loggin in
- new server ready

Steeps I did
1. Run imapsync dry run to see whta breaks
2. Run it for real, takes forever for big boxes
3. Lower TTL on DNS like 24h before if u can
4. Flip A record and MX to new server
5. Run imapsync AGAIN for anythign that arrived during propogation
6. Keep old server runnign a week just in case

DNS timing is teh worst part. If ur TTL is 3600 default it can take hours for peopel to hit new box. Some mail servers cache longer than TTL says too so dont trust it

I used Hostinger old and Vultr new, both cheap shared plans, nothign fancy

This is probably full of typos im not fixing it, you figure it out

#2

Hi tomhider, this is solid but why no mention of --delete1 option? Without it the old server keeps duplicates forever, Also for DNS you can add second MX pointing to new IP with lower priority before flip, then no lost mail at all. Try it next time.

SPF, DKIM, DMARC — holy trinity ✉️
#3

Imapsync is single-threaded perl, my dedi has 128GB and I just run 20 instances in parallel. Your cheap shared plan is probably 1GB max, no wonder it takes forever. I migrated 50GB mailboxes in 20 minutes. Humblebrag sure but specs matter here.

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft