Skip to main content

How to migrate email to a new server via IMAP

Published on July 4, 2026 8 min read

Migrate email to a new server without losing messages: move your mailboxes over IMAP and reconfigure your MX, SPF, DKIM and DMARC records.

Flat illustration of email migrating as small envelopes from one mail server to another, while a figure at a laptop oversees the move.

When you move to a new hosting or email provider, you want to migrate email to the new server without losing a single message. By moving your mailboxes over IMAP you copy all of your existing messages, folders and aliases neatly to the new server while your old mail stays reachable. This guide walks you through how to migrate email to a new server step by step: from taking stock of your mailboxes to reconfiguring your MX records and your SPF, DKIM and DMARC.

What migrating email actually means

Migrating email means moving your mailboxes and all existing messages from one mail server to another. Two separate things are involved: the mailboxes with your messages, which live on the server, and the DNS records that decide where new email is delivered.

IMAP (Internet Message Access Protocol) is your main tool here. With IMAP your messages stay on the server rather than only locally on your computer. That lets you synchronise a full copy from one server to another, including folders and read status. If you used POP3 in the past, some messages may exist only locally in your email client, so check that first.

One thing to keep clear: creating mailboxes and copying messages is separate from changing your MX records. Only once your messages are safely on the new server do you use the MX records to route new email to it. If you are moving your website at the same time, combine these steps with our guide on how to migrate your website to LJPc.

Preparation: take inventory and lower the TTL

Good preparation prevents surprises. First map out exactly what you are moving.

  • All mailboxes (the full email addresses) and their passwords.
  • Aliases and forwarding addresses (forwarders).
  • Automatic replies, such as out-of-office messages, and your mail filters or rules.
  • Your current server and port settings, so you can use them as the source.

A day or two beforehand, also lower the TTL (time to live) of your MX record to, say, 300 seconds. The TTL sets how long DNS servers remember a record. A low TTL means the later change to your MX records is picked up quickly, which shortens the switch-over.

Step by step: migrate email without losing messages

Here is the full order of play. Work through the steps from top to bottom.

  1. Take inventory of your mailboxes, aliases and forwarding rules.
  2. Create the same mailboxes in Plesk on the new server.
  3. Synchronise your existing mail over IMAP to the new server.
  4. Change the MX records so new email goes to the new server.
  5. Wait for DNS propagation and keep both mailboxes active for a while.
  6. Run a final synchronisation and set up your email clients again.

The most important steps are explained further below.

1. Create mailboxes and aliases in Plesk

On the new server, create a mailbox for every email address. At LJPc you manage email addresses in Plesk. Go to Websites & Domains, open the Mail tab and choose Create Email Address. Use exactly the same addresses as on the old server and set a password for each one.

Recreate your aliases and forwarding addresses as well. An alias delivers email into an existing mailbox, while a forwarding address sends email on to another address. Only switch on automatic replies once the move is finished, so your test messages do not trigger an out-of-office reply.

2. Synchronise existing mail over IMAP

Now you copy all existing messages from the old server to the new one. Do this while both mailboxes still exist. There are two common methods.

Option A: ImapSync. ImapSync is a dedicated, open source migration program that copies mailboxes from server to server. It is the fastest and most reliable method for larger volumes of mail. A basic command looks like this:

imapsync \
  --host1 old-server.example.com --user1 you@yourdomain.com --password1 'old-password' --ssl1 \
  --host2 ljpc.email --user2 you@yourdomain.com --password2 'new-password' --ssl2 \
  --automap --syncinternaldates

Here host1 is your old server and host2 is the new server (ljpc.email). The --automap option maps special folders such as Sent and Trash automatically, and --syncinternaldates keeps the original dates of your messages. Run the command with --dry first to test without copying anything. You can safely run ImapSync several times: only new messages are transferred and duplicates are skipped.

Option B: an email client with both accounts. If you only have a few mailboxes, you can also use an email client such as Thunderbird, Outlook or Apple Mail. Add both your old and your new account as IMAP accounts. Wait until both accounts are fully loaded, then drag or copy the folders and messages from the old account to the new one. Because IMAP updates everything on the server, the messages then also sit on the new server.

3. Change the MX records to the new server

Once your existing mail is on the new server, route new email there too. You do this with your domain's MX record. The MX record (mail exchanger) decides which server receives incoming email for your domain.

If LJPc manages your DNS through our name servers, the MX record is usually already correct after you create your mailboxes, so you do not need to change anything. If your DNS is hosted elsewhere, change the MX record to the mail server LJPc gives you. Remove old MX records from the previous provider, so email does not keep going to the old server by mistake.

4. Wait for DNS propagation and run a final synchronisation

After you change the MX record, it takes a while before DNS servers worldwide know the new value. This is called DNS propagation and can take anywhere from a few minutes to a few hours, depending on your TTL.

During this window, email may still arrive on the old server. So keep your old mailbox active for at least a few more days. At the end, run ImapSync once more, so any messages that arrived on the old server during propagation are still copied across to the new server. That way you lose nothing.

5. Set up email clients with the new server details

Finally, set up your email apps and phones to use the new server. At LJPc, use the following details:

LJPc mail server settings for incoming and outgoing email.
SettingIncoming mail (IMAP)Outgoing mail (SMTP)
Serverljpc.emailljpc.email
Port993465 or 587
SecuritySSL/TLSSSL/TLS (465) or STARTTLS (587)
Usernameyour full email addressyour full email address
Passwordyour mailbox passwordyour mailbox password

Then test whether you can send and receive an email. If outgoing mail does not work on port 465, try port 587 with STARTTLS, or the other way around.

Reconfigure SPF, DKIM and DMARC after the move

You now send email through a new server. So you need to check and update the records that state which servers may send on behalf of your domain. Otherwise your outgoing email ends up in spam more easily.

SPF. The SPF record tells recipients which servers may send email for your domain. Update it so it authorises the new mail server, and remove the reference to your old provider if you no longer use it.

DKIM. DKIM signs your outgoing email with a digital signature. On the new server, Plesk generates a new DKIM key, so the old DKIM record no longer works. Enable DKIM in Plesk, under the Mail tab in the mail settings, and publish the new DKIM record in your DNS. Under "configure external DNS", Plesk shows exactly which value you need.

DMARC. The DMARC record tells recipients what to do with email that fails SPF or DKIM. You usually do not need to change the record itself, but do check that SPF and DKIM line up again after the move, so DMARC keeps passing.

Troubleshooting common problems

Common problems when migrating email and how to solve them.
ProblemPossible causeSolution
New email still lands on the old serverMX record not changed yet, or DNS not propagatedCheck the MX record and wait for propagation; keep the old mailbox active
Messages are missing after the synchronisationSync interrupted or a folder not carried overRun ImapSync again; it only copies what is still missing
Outgoing mail is refusedWrong port or security settingUse port 465 (SSL/TLS) or 587 (STARTTLS) with your full email address as the username
Outgoing mail ends up in spamSPF or DKIM not updated yetUpdate the SPF record and publish the new DKIM record
Cannot connect to the mailboxWrong server nameUse ljpc.email as both the incoming and outgoing server

Still stuck? Get in touch with support and we will take a look with you. If you would rather not handle the move yourself, our team is happy to help.

Frequently asked questions

Will I lose messages when I migrate my email?

No, not if you work over IMAP. IMAP keeps your messages on the server, so you can copy them in full to the new server. Keep your old mailbox active until the move is finished and run one more synchronisation at the end, and everything is preserved.

What is the difference between IMAP and POP3 during a migration?

With IMAP your messages sit on the server and are preserved after synchronisation. With POP3 messages are often downloaded to your computer and removed from the server. Migrating is therefore easiest over IMAP. If you used POP3, first check whether your old messages are still on the server or only stored locally.

Should I synchronise my mail first or change the MX record first?

Synchronise your existing mail first and only then change the MX record. That way your old messages are already on the new server before any new email arrives there. After the change, run one final synchronisation for messages that arrived on the old server during propagation.

Which server settings do I use for email at LJPc?

Use ljpc.email as both the incoming and outgoing server. Incoming mail (IMAP) uses port 993 with SSL/TLS. Outgoing mail (SMTP) uses port 465 with SSL/TLS or port 587 with STARTTLS. Your username is your full email address.

Why does my email end up in spam after the move?

Usually because SPF or DKIM is not right yet. You send through a new server, so the SPF record must authorise that server and you must publish the new DKIM record that Plesk generated. After that, check that DMARC still passes.

Prefer to talk to someone?

We are also happy to answer your questions personally. Schedule a free consultation or call us directly. We are glad to think along with you.

Stay up to date with recent developments! Subscribe and receive our newsletter Signing up... Thank you for subscribing! Something went wrong. Please try again later.