How-To

Migrate mailboxes between two cPanel accounts using File Manager

This is a manual migration. The alternative would be to migrate the emails via an email client like Outlook.

Last updated: September 3, 2025

Before you begin

  • Both source and destination are cPanel and use Maildir (standard on cPanel). Folders are stored as cur, new, tmp under /home/user/mail/domain/mailbox/.
  • The destination must have the same domain set up and each mailbox recreated with the exact address. Passwords cannot be copied via File Manager; set them manually.
  • Login once to each new mailbox via Webmail to initialize the folder structure (creates hidden folders like .Sent, .Drafts, etc.).
  • Plan DNS cutover (MX/A/NS) so new mail starts arriving at the destination after migration.
POP3 users: only mail left on the server will migrate. Local mail stored in Outlook/Apple Mail won’t be on the server.

1) Prepare the destination mailboxes

  1. In destination cPanel → Email Accounts, create each mailbox (same address and quota).
  2. Click Check Email → open Roundcube once to initialize folders for each account.
  3. (Optional) If you plan a later DNS cutover, set a low TTL on MX/A records ahead of time.

2) On the source cPanel, collect mailbox data

  1. Open File Manager → click Settings (top‑right) → enable Show Hidden Files (dotfiles).
  2. Navigate to mail/domain.tld/user/. You should see cur, new, tmp and hidden folders like .Sent, .Drafts, .Trash, .Junk.
  3. Select everything except any dovecot.index* and dovecot-uid* files (indexes will rebuild). Click CompressZip (e.g., user_mailbox.zip).
  4. Download the zip.
Repeat for each mailbox that you need to migrate.

3) Upload to the destination and merge

  1. Destination cPanel → File Manager → open mail/domain.tld/user/.
  2. Upload user_mailbox.zip and Extract. When prompted, choose to merge/overwrite the cur / new contents and any dot‑folders (.Sent, .Drafts, etc.).
  3. Ensure file ownership is the account user (File Manager uploads set this automatically). If present, you can safely remove any dovecot.index* files so Dovecot rebuilds them.

4) Verify mailbox data

  1. Open Webmail (Roundcube) for the mailbox → confirm messages appear in Inbox and sub‑folders.
  2. If folders seem missing, go to Settings → Folders and make sure they’re subscribed.
  3. Send a test message in/out. If using HTTPS, confirm the certificate is valid for Webmail.

5) Switch DNS (when ready)

  1. Update the MX record to point to the new hosting plan.
  2. Allow DNS to propagate. New messages will start landing on the destination server.
  3. In some cases, you may need to set the email routing to Local. This can be done from cPanel, Email Routing.

FAQ & Notes

Where exactly are the mails stored? For each mailbox: /home/<cpanel-user>/mail/<domain>/<mailbox>/. Inbox data lives in cur (read) and new (unread); temporary deliveries in tmp. Sub‑folders are hidden dot‑folders (e.g., .Sent).

Why remove dovecot.index*? They are per‑folder index/cache files. Deleting them after a manual copy forces a clean rebuild and avoids display inconsistencies.

Alternative method? You can try to migrate them by backing up the emails via an email client and importing them back after you re-created the accounts on the new cPanel. Feel free to refer to online guides for this.