Column 1
Skip to content
Column 1

Migrating cPanel Email Accounts Without Website Data: A Niche Yet Essential Guide

cPanel email account migration checklist

Part 1: Extract Email Addresses from the Old cPanel Server

  1. SSH into the Old cPanel Server: Log in to your old cPanel server using SSH.
  2. Navigate to the Domain Directory:
    cd /home/[username]/etc/[yourdomain.com]/
    Replace [username] and [yourdomain.com] with your actual cPanel username and domain.
  3. Extract Email Addresses: Create a list of email addresses:

    for email in *; do
    if [ -d "$email" ]; then
    echo "${email}@yourdomain.com"
    fi
    done > email_addresses.csv

Part 2: Create Email Accounts on the New cPanel Server with Unlimited Quotas

  1. SSH into the New cPanel Server: Connect to your new cPanel server via SSH.
  2. Use cPanel Scripts to Create Email Accounts with Unlimited Quotas: Use a script to read the email addresses from the CSV file and create email accounts with random passwords:

    #!/bin/bash
    while IFS= read -r email; do
    random_password=$(< /dev/urandom tr -dc A-Za-z0-9 | head -c12)
    /scripts/addpop --email="$email" --password="$random_password" --quota=0
    done < /path/to/email_addresses.csv

    Ensure you have the necessary administrative privileges to run cPanel scripts.

Part 3: Transfer Email Data and Shadow File

I have gone over this section to no end and the only way I have been able to get this to work correctly is to open the /home/[username]/etc/[yourdomain.com]/shadow file on the source server and also on the destination server and as much as I do not advise this to anyone who has not made backups nor made cpmover backups has to copy and paste the contents over the one in that file.

This is the only way I have been able to get this to work correctly since the permissions are a nightmare in anyway that doesn't require root on both the source server and destination server.

Important Notes

  • Testing: Always test these processes in a controlled environment before applying them to a live server.
  • Security and Compliance: Handle sensitive information like email data and passwords with utmost care.
  • Backup: Create backups of all relevant data before performing any server migration tasks.
  • Permissions and Ownership: Verify and correct file permissions and ownerships as necessary.
  • User Communication: Inform users about the migration process, especially about the temporary passwords and the need to reset them post-migration.

This approach simplifies the migration process by focusing on transferring email addresses and data, setting temporary passwords, and ensuring the encrypted passwords are retained by transferring the shadow file.

Email authentication maintenance note

Email DNS changes should be handled like a launch task, not a quick copy-and-paste job. Before changing SPF, DKIM, DMARC, MX, or SMTP settings, record the current DNS values, confirm who sends mail for the domain, and keep a rollback note in case forms, invoices, password resets, or customer replies stop flowing.

Safe verification checklist

  • Confirm there is only one SPF TXT record for the domain.
  • Check that every active sender is included before tightening SPF or DMARC policy.
  • Verify DKIM signing from the actual mail provider, not only that a DNS selector exists.
  • Start DMARC in monitoring mode when you are not sure all senders are aligned.
  • Send test messages to multiple mailbox providers and review headers before declaring the change finished.

Related email and DNS guides

2026 Support Update: cPanel Email Account Migration Checklist

Current action path: Email-only migration should keep website files out of scope while proving mailbox contents, DNS, SPF, DKIM, client settings, and delivery.

What to verify before production changes

  • Define mailbox scope, DNS ownership, SPF, DKIM, DMARC, and client settings before migration.
  • Move a test mailbox or sample first when possible.
  • Verify inbound, outbound, webmail, client login, and spam placement after cutover.

Source-backed references and next reads

For support tickets, keep the exact system touched, backup timestamp, changed setting, public URL, and post-change verification result in the notes. That is the difference between a tutorial and an operational recovery path.