Bulk Migrate cPanel Mailboxes via CSV
Move hundreds of cPanel accounts at once — CSV format, folder strategy, per-row server overrides for multi-host setups, validation, and recovery for failed rows.
Article details
Type, difficulty, plans, and last updated info.
▼
Article details
Type, difficulty, plans, and last updated info.
- Type
- Guide
- Difficulty
- Intermediate
- Plans
- Starter · Pro · Agency
- Last updated
- Sep 9, 2026
Bulk Import can move many cPanel or other custom IMAP mailboxes in one batch. Use it after the TrekMail destination mailboxes have been created and after you have verified the old provider's IMAP settings.
This is a CSV-based migration. The CSV includes source mailbox credentials, so plan who creates it, where it is stored, and when it will be deleted.
Gather the source settings
Open the old provider's Email Accounts page, then Connect Devices, Configure Mail Client, or its equivalent. Copy the secure incoming IMAP settings shown for that mailbox:
- IMAP hostname;
- port;
- security setting; and
- full mailbox email address and its mailbox password.
Use the values from the provider rather than a generic host list. Different cPanel servers and plans can use different names and settings.
The bulk CSV has no separate username field. It signs in with the source email address in each row. If the source provider requires a different username format, use the single import flow for that mailbox or resolve the format with the source provider before including it in a bulk batch.
Prepare destination mailboxes and CSV
Every destination_email must already be a TrekMail mailbox in your account. Create missing ones first with Bulk Mailbox Creation.
Use the simple three-column format when all source mailboxes use one server:
source_email,source_password,destination_email
alice@old-example.com,password-for-alice,alice@new-example.com
bob@old-example.com,password-for-bob,bob@new-example.com
Use the six-column format when rows use different source servers:
source_email,source_password,destination_email,source_host,source_port,source_security
alice@site-one.example,password-for-alice,alice@new-example.com,mail.site-one.example,993,ssl
bob@site-two.example,password-for-bob,bob@new-example.com,mail.site-two.example,993,ssl
Turn on Each row has its own server settings for the six-column file. See Bulk Migration CSV Format for all CSV rules, limits, quoting, and templates.
Keep the file out of support tickets, email threads, repositories, and shared folders. Delete the temporary local copy after the result is checked.
Start the batch
- Open Import > Bulk Import and choose Other.
- Paste or upload the CSV.
- For the simple format, enter the shared IMAP host, port, and security setting in Advanced settings. For the six-column format, turn on per-row server settings.
- Select Preview & validate. The preview checks the CSV structure, source settings, destination mailboxes, and duplicate mappings. It does not log in to every source mailbox yet.
- Fix invalid rows and preview again.
- Choose the folder strategy:
- Preserve folder tree for the complete source layout, including custom folders.
- Flatten to INBOX for one Inbox-based archive with the original folder identified.
- Only INBOX + Sent for a deliberately limited move.
- Keep Skip duplicates selected unless there is a clear reason to change it. Add an optional batch name and select Start.
An account can have one active bulk batch. The maximum batch size is 100 rows on Starter, 300 on Pro, and 1,000 on Agency. A file cannot exceed 2 MB.
Monitor and recover
The batch detail page shows a per-mailbox result as well as totals. A batch can be queued, running, paused, completed, completed with errors, or cancelled.
- A row fails: Read the specific message, correct the old mailbox password or connection setting, then use Continue incomplete when it is available.
- The batch is paused: Review destination storage, then select Resume when it is ready. Batches pause at 90% storage to avoid a hard failure.
- You need to stop work: Select Cancel all, then review the state of completed and partly completed mailboxes before starting anything new.
- You need a record: Use Download CSV on the batch detail page for the current status of every row.
Do not delete the old mailboxes or change MX records until you have checked a sample of source and destination folders. If you need a later catch-up pass, use a new batch with Skip duplicates selected.
Common problems
Destination mailbox not found
Create the destination mailbox in TrekMail, correct the CSV address, and preview again. The destination must belong to the same TrekMail account that starts the batch.
Authentication or connection failure
Reopen the old provider's mail-client settings and copy the host, port, security option, source email, and password again. Do not turn off encryption just to make the connection pass. If the provider requires an app password, use it instead of the normal mailbox password.
Some mail is missing after completion
Check the selected folder strategy, optional date filter, and duplicate setting first. Then compare the source and destination folder names. If the system reports a partial result, continue that row rather than starting the same import from scratch.
Related articles
Jump to nearby guides that continue the workflow.