- Make sure you have updated your DNS records on the old server, lowering the TTL to a few minutes
- Set up the account (the one from the original server) on your favorite e-mail client, selecting IMAP as the mail protocol
- Once the remote folders and messages are downloaded on your local machine, copy them to a local data file within the e-mail client
- Set up the new account on the same e-mail client, again selecting IMAP
- Copy the folders and messages to the new - empty - account
- Once you are finished with all accounts, update your DNS settings to point to the new server