Skip to main content

How to migrate email to a new server via IMAP

Published on July 4, 2026 15 min read

Move your email to a new server with every message intact: copy mailboxes over IMAP with our portal, imapsync or your mail app, then update MX and SPF.

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

Moving your email to a new server comes down to three steps: create the same mailboxes on the new server, copy your messages from the old mailbox to the new one over IMAP, and then point your domain's MX records at the new server. Your folders and messages arrive complete, and from that moment new mail lands in the new mailbox. Moving to LJPc hosting? We help you migrate your email free of charge.

Below you'll find what IMAP carries over, how to copy your mail with our customer portal, with imapsync or with your mail app, and how to set up MX, SPF and DKIM afterwards. Leaving LJPc with your email instead? See how to close a mailbox and keep your email.

What moves over IMAP, and what you set up again

With IMAP your messages live on the server, and that is what lets you copy a mailbox from one server to another. Settings of your old server are not part of the mailbox itself, so you recreate those with us.

What moves when you migrate email over IMAP.
ItemMoves over IMAPWhat to do
Messages and folders, including Sent and ArchiveYesCopy them with one of the routes below
Read, unread and flagged statusYesNothing, it travels with the messages
Aliases and forwardersNoCreate them again, see email forwarding and aliases
Out-of-office reply and filtersNoSet them up again after the move, see setting an out-of-office reply and LJPc webmail
Contacts and calendarsNo, they are not part of IMAPExport them from your mail app or at your old provider
Mail stored only on your computer (POP3)No, it is no longer on the serverCopy it from your mail app, see route 3 below

Before you start

  • A list of all your email addresses, with their passwords at your old provider.
  • Your aliases, forwarders, out-of-office reply and filters, so you can set them up again with us.
  • The IMAP server of your old provider, with its port and encryption. You find them in the account settings of your mail app or in your old provider's documentation.
  • The size of your mailboxes. Your email counts towards the storage of your hosting package. How much space your package has and uses is explained in checking your storage usage.

If your domain's DNS is still with your old provider, lower the TTL of your MX record there a day in advance, for example to 300 seconds, if they allow it. The TTL sets how long other servers remember a record, so a low TTL makes the later change visible everywhere sooner. More on that in DNS propagation.

Step by step: moving your email to LJPc hosting

  1. Create your mailboxes at LJPc hosting.
  2. Copy your existing mail over IMAP.
  3. Point your domain's mail at LJPc: MX, SPF and DKIM.
  4. Set up your mail apps and phones with ljpc.email.
  5. Copy over the mail that still reached your old provider.
  6. Cancel your email at your old provider once everything has moved.

1. Create your mailboxes

Create a mailbox for every email address, with exactly the same address as at your old provider. You do this in the customer portal, as described in creating an email address in the customer portal, or in Plesk with creating an email address in Plesk. You choose the password yourself. If you use the Migrate email button from step 2, it creates any missing mailboxes for you.

Then recreate your aliases and forwarders. Wait with your out-of-office reply until the move is complete, so your test messages don't trigger an automatic answer.

Do your domain's nameservers already point to LJPc, for example because your website already runs with us? Then new mail is already arriving with us. In that case create your mailboxes right away, so mail to your addresses has a place to land straight away.

2. Copy your existing mail over IMAP

There are three routes. All three copy your messages and folders, and your mail at your old provider stays in place until you cancel it.

Three ways to move your mail over IMAP.
RouteBest forWhat you need
1. The Migrate email button in the customer portalAny move to LJPc hosting, including many mailboxesThe IMAP server of your old provider, plus the address and password of each mailbox
2. imapsyncMany mailboxes or a lot of mail, if you work on the command lineimapsync on your computer and the login details of your old and new mailbox
3. Your mail appA few mailboxes, or mail that only lives on your computerA mail app with both your old and your new account in it

Rather have us do it? We help you migrate your email free of charge. Create a support ticket with your domain and the number of mailboxes, and we'll agree with you how we move your mail.

Route 1: the Migrate email button in the customer portal

With this button we collect your mail from your old server and place it, folders and all, in your mailboxes with us. You'll find it with your site in the Email addresses block, next to Add email address. Working with a sub-account and don't see it? Ask your main account for the Migrate email permission under Sub-accounts.

  1. Sign in to the customer portal, choose Services and then Sites in the menu, and click your site.
  2. In the Email addresses block, click Migrate email.
  3. Under Old server, enter the Server name of your old provider's IMAP server, preferably choose SSL/TLS (port 993) under Encryption, and click Continue to the mailboxes.
  4. For each mailbox, enter the Address at the old provider and the Password at the old provider. The address under New address with us fills itself in and stays editable. If the mailbox doesn't exist yet, we create it when you start. Leave New password empty and it gets the same password as at your old provider. Another mailbox adds a row.
  5. Already created the mailbox with us? Enter the password it should keep under New password. That way it keeps working on your devices with the password it has now.
  6. Click Next. We then check that we can sign in to your old server, measure your mailboxes and see whether everything fits in your hosting package. This usually takes less than a minute. If a row fails, the reason appears under it and you correct it right there.
  7. If your MX records still point to your old provider, tick Enable follow-up sync and choose the Number of days, up to 30. We then collect the new messages that still arrive there every hour.
  8. Click Transfer now. You can close the page afterwards: you receive an email the moment everything has been transferred.

After Transfer now you reach the Transfer step, headed Your email is being transferred. There you follow the progress of each mailbox; the page updates itself while anything is running.

  • While the transfer runs, the Progress column shows a bar with the number of messages transferred out of the total, for example 1,250 / 4,000.
  • Once a mailbox is done, it shows how many messages were transferred and when it was last updated.
  • If a mailbox fails, the reason appears in the Progress column. Click Migrate another mailbox, correct the row, click Next and then Transfer now again.

When all mailboxes are done, you see the follow-up sync block below the list. If you switched on follow-up sync, it shows until which date we collect the new messages that arrive at your old provider every hour. Once your MX records point to us and nothing arrives there any more, click Stop now. We then stop collecting, and everything already in your new mailbox stays exactly as it is. If you have not switched on follow-up sync yet, you can still do it here: choose the Number of days, up to 30, and click Enable follow-up sync.

If your mail doesn't fit in the space your package has left, the check tells you and the migration doesn't start. Free up space first or choose a larger package. To move another address later, click Migrate another mailbox. The passwords you enter for the migration are wiped once it has finished.

Route 2: imapsync

The imapsync tool copies mailboxes from server to server on the command line. It suits many mailboxes or a lot of mail, if you prefer to run the move yourself. One command per mailbox looks like this:

imapsync \
  --host1 imap.example.com --user1 info@yourdomain.com --passfile1 old.txt --ssl1 \
  --host2 ljpc.email --user2 info@yourdomain.com --passfile2 new.txt --ssl2 \
  --automap
  • host1 is your old provider's IMAP server, host2 is ljpc.email. With --ssl1 and --ssl2 imapsync connects encrypted on port 993.
  • old.txt and new.txt contain only the password, on the first line. That keeps it out of your command: with --password1 anyone on the same computer can see the password in the process list.
  • --automap puts well-known folders such as Sent, Drafts and Junk in the right place. imapsync keeps the original dates of your messages by default.
  • Test first with --justlogin to see whether you can sign in on both servers, then with --dry: imapsync shows what it would do without copying anything.
  • imapsync doesn't copy messages that are already on the new server. You can stop a copy and restart it later, and run the same command again after the DNS change to pick up the latest mail.

If signing in to ljpc.email fails, check your password in webmail before you start imapsync again. A series of failed attempts can get your IP address blocked, see what is fail2ban.

Route 3: your mail app

Only a few mailboxes, or mail that only lives on your computer because your mail app used POP3? Then copy it with your mail app, for example Thunderbird, Outlook or Apple Mail.

  1. Add your new LJPc mailbox as an IMAP account, with the settings from step 4. Keep your old account in place.
  2. Wait until both accounts have loaded all their folders.
  3. Create the same folders in your new account as in your old one.
  4. Select all messages in each folder and copy them to the same folder in your new account. Choose copy rather than move, so your messages also stay at your old provider until you've checked everything.
  5. Check in webmail at ljpc.email that every folder is there and the number of messages per folder matches.

Because IMAP updates everything on the server, the copied messages then show up on all your devices.

Moving from Gmail or Microsoft 365?

  • Gmail and Google Workspace. Use imap.gmail.com on port 993 as the IMAP server, with an app password instead of your Google account password. You can create an app password once 2-Step Verification is on. If you don't see that option, for example with an account from your organisation, copy your mail with a mail app where you use Sign in with Google (route 3).
  • Microsoft 365. Microsoft no longer allows IMAP sign-in with only a password, see Microsoft's explanation. Copy your mail with a mail app where you add your Microsoft account, such as Outlook or Thunderbird (route 3), or get in touch with us.

3. Point your domain's mail at LJPc

Once your existing mail is on the new server, let new mail arrive there too. That's what your domain's MX record does. What you change depends on where your domain's DNS lives.

What to change in your domain's DNS, per situation.
Where is your DNS?What you do
Your domain already uses the LJPc nameservers (ns1, ns2 and ns3.ljpc.network)Nothing. The DNS zone of your hosting package already has the MX records mx1.ljpc.email and mx2.ljpc.email, the SPF record and the DKIM record, so new mail already arrives with us.
You switch your nameservers to LJPc now, or transfer your domain to usChange the nameservers as described in changing your nameservers. If you transfer your domain to LJPc, the nameservers point to us automatically once the transfer completes, see transferring your domain to LJPc. Your website then points to your hosting package with us as well, so prepare it first with migrating your website to LJPc.
Your DNS stays with another providerSet the MX records there to mx1.ljpc.email and mx2.ljpc.email, both with priority 10, and remove your old provider's MX records. Add include:_spf.ljpc.network to your SPF record and add the DKIM record. All values are in pointing a domain at another provider to LJPc hosting.

4. Set up your mail apps and phones

Next, move every device over to the new server. For most domains on our hosting the automatic setup details are already in place, so your mail app finds the servers by itself. If it asks, use these details:

LJPc hosting mail server settings.
SettingValue
Incoming server (IMAP)ljpc.email, port 993, SSL/TLS
Outgoing server (SMTP)ljpc.email, port 465 (SSL/TLS) or 587 (STARTTLS)
Usernameyour full email address
Passwordthe password of your mailbox at LJPc

Add your LJPc mailbox as a new account and remove the old account once everything has moved. Steps per device and mail app are in setting up email on your phone and computer. Getting an error? Look it up in fixing errors in your mail app.

5. Copy over mail that still reached your old provider

A DNS change isn't visible everywhere at once: usually within a few hours, at most 48 hours, depending on the TTL. Until then some mail can still arrive at your old provider. Keep your old mailbox for a few more days and then copy the last messages:

  • With the Migrate email button: follow-up sync collects those messages for you every hour, until the end date you chose.
  • With imapsync: run the same command once more. Only what is still missing gets copied.
  • With your mail app: copy the new messages from the old account's inbox to your new account.

6. Cancel your old email

Send a test message to your address from another account, for example from your phone or a Gmail account. When it arrives with us and you see all your folders in webmail, cancel your email at your old provider. Now is also the time to switch your out-of-office reply and filters back on.

SPF, DKIM and DMARC after the move

Once you send through ljpc.email, receiving servers need to see that our mail servers may send on behalf of your domain. Three DNS records take care of that.

  • SPF. Your domain's SPF record contains include:_spf.ljpc.network, for example v=spf1 include:_spf.ljpc.network -all. That entry tells receivers our outgoing mail servers may send for your domain; without it they may reject your mail or mark it as spam. Remove your old provider's entry once you no longer send through them, and keep other services that send for your domain, such as a newsletter service, in the same record.
  • DKIM. Plesk signs your outgoing mail with the selector default. With the LJPc nameservers the record for it is already in place. If your DNS lives elsewhere, copy the DKIM record from Plesk as described in what is DKIM. If your old provider also used the name default._domainkey, replace the value of that record.
  • DMARC. You rarely need to change your DMARC record: it passes as soon as SPF or DKIM passes for the domain in your sender address. With the LJPc nameservers a DMARC record with p=quarantine is in place by default.

After the change, send a message to an address at another provider, for example Gmail, and open the original source there. If the Authentication-Results header shows spf=pass and dkim=pass, everything is set up correctly.

Common problems when you migrate email

Common email migration problems and how to fix them.
ProblemCauseFix
New mail still arrives at your old providerThe MX record still points to your old provider, or the change isn't visible everywhere yetCheck the MX record, see troubleshooting DNS problems, and copy the mail over as in step 5
Mail to an address stops arriving after the switchThe mailbox or alias doesn't exist with us yetCreate the address in the customer portal, or as an alias if it was an alias at your old provider
Signing in to your old server failsWrong server name, port or password, or your old provider requires an app passwordTake the details from your mail app. For Gmail and Microsoft 365, see above
Messages or folders are missingThe copy was interrupted or a folder didn't come acrossRun imapsync again or copy the folder once more in your mail app. With the Migrate email button the reason is shown next to the mailbox
Messages show up twice in your new mailboxThe same mail was copied by two routesStick to one route. How to clean up duplicates is explained in closing a mailbox and keeping your email
Copying stops because there is no space leftThe mailbox has a maximum size, or your package is fullSee mailbox full and checking your storage usage
Your mail lands in spam or gets rejectedSPF or DKIM isn't set up for LJPc yetAdd include:_spf.ljpc.network and the DKIM record as described above
Your mail app can't connectWrong server name, port or passwordUse ljpc.email with your full email address as username, see errors in your mail app

Stuck? Create a support ticket and we'll look into it with you. And if you'd rather leave the move to us: we help you migrate your email free of charge.

Frequently asked questions

How long does an email migration take?

The copy itself depends on how much mail you have. With the Migrate email button in the customer portal the check usually takes less than a minute; after that you can close the page and you receive an email once everything has been transferred. The MX change is usually visible everywhere within a few hours, depending on the TTL.

Will I lose email when I move to a new server?

With the right order all your mail is kept: copy your messages first, then switch the MX record, and then copy over the messages that still reached your old provider. Your old mailbox stays in place until you cancel it.

Do aliases and forwarders move over IMAP?

No. IMAP copies your messages and folders. Aliases, forwarders, filters and an out-of-office reply are server settings, so you set them up again at LJPc.

Can LJPc migrate my email for me?

Yes, we help you migrate your email free of charge. If you see the Migrate email button with your site in the customer portal, you move your mailboxes with it. If you work with a sub-account, your main account gives you that permission under Sub-accounts. Rather have us do it? Ask support to run the migration for you.

How do I move my email from Gmail or Microsoft 365 to LJPc?

For Gmail and Google Workspace, use imap.gmail.com with an app password. Microsoft 365 no longer allows IMAP sign-in with only a password, so copy your mail with a mail app such as Outlook or Thunderbird in which you add both your Microsoft account and your LJPc mailbox.

Which mail server do I use after moving to LJPc?

ljpc.email for incoming and outgoing mail: IMAP on port 993 with SSL/TLS and SMTP on port 465 with SSL/TLS or port 587 with STARTTLS. Your username is your full email address.

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...