Bulk Migration CSV Format

CSV format specification for bulk email migration with examples and templates.

Article details

Type, difficulty, plans, and last updated info.

Type
Guide
Difficulty
Intermediate
Plans
Starter · Pro · Agency
Last updated
Sep 9, 2026

Use this format with Bulk Import. The file contains source mailbox passwords, so create it in a secure location and delete it when the migration is complete. Do not attach it to a support ticket or store it in a repository.

Download the simple or full template from Import > Bulk Import if you prefer to start with a file TrekMail has generated.

Simple format: three columns

Use this when all source mailboxes use the same IMAP server. Choose the provider and enter the shared server settings in the Bulk Import form.

source_email,source_password,destination_email
alice@old-example.com,app-password-for-alice,alice@yourdomain.com
bob@old-example.com,password-for-bob,bob@yourdomain.com
Position Value
1 Source mailbox email address.
2 Source mailbox password or app password.
3 Destination TrekMail mailbox address. It must already exist in your account.

No destination password is needed.

Full format: six columns

Use this when source mailboxes use different IMAP hosts. Turn on Each row has its own server settings in the form before previewing the file.

source_email,source_password,destination_email,source_host,source_port,source_security
alice@gmail.com,app-password-for-alice,alice@yourdomain.com,imap.gmail.com,993,ssl
bob@old-example.com,password-for-bob,bob@yourdomain.com,mail.old-example.com,993,ssl
Position Value
1 Source mailbox email address.
2 Source mailbox password or app password.
3 Destination TrekMail mailbox address.
4 Source IMAP hostname.
5 Source IMAP port.
6 Source security option: ssl, tls, or none.

Ask the source provider for the host, port, and security setting. Prefer its secure IMAP option. Do not choose none merely to bypass a connection error.

Rules that prevent preview errors

  • Keep the column order. TrekMail reads the positions shown above. The headers are optional, but if you include them, use the order in these examples.
  • Use three columns or six columns. Do not mix the formats in one file.
  • File limit: 2 MB and no more than 1,000 data rows. The batch limit is lower on Starter and Pro, and the preview shows the rows allowed for your account.
  • Use UTF-8 when exporting from a spreadsheet. TrekMail can handle some legacy encodings, but UTF-8 is the reliable choice for names and passwords with non-English characters.
  • Comma, tab, and semicolon separators work. TrekMail detects the separator from the file.
  • Blank lines and lines beginning with # are ignored.
  • Quote fields that contain a separator. For example, write a comma in a password as "pass,word". A literal quote inside a quoted field is written twice: "pass""word".
  • Check each source and destination only appears once. A source mailbox cannot be mapped to more than one destination in the same batch, and a destination cannot accept two source mailboxes in the same batch.
  • For six-column files, keep the number of distinct source hosts practical. The preview accepts up to 50 unique hosts at once. Split a larger mixed-provider project into separate batches.

Before you select Start

Preview the file and fix all invalid rows. Common reasons are a missing destination mailbox, an empty source password, a malformed source address, an unsafe or invalid source host, or a duplicate mapping in the file.

For Gmail, Outlook, Yahoo, and iCloud, use the relevant app password if the provider requires one. A normal account password is often rejected when two-step verification is enabled.

Related articles

Jump to nearby guides that continue the workflow.

We use necessary technologies to operate and secure TrekMail. Selecting Okay also allows limited analytics and advertising measurement described in our Cookie Policy.

Sign in to TrekMail

Access your dashboard, mailboxes and DNS.

or

12 characters passwords match

or

Reset email sent

If an account exists for this email, we've sent password reset instructions.

By continuing, you agree to TrekMail's Terms and Privacy Policy.