If you have several mailboxes to move, you can set them all up in one upload instead of filling in the form for each one. Each row of a CSV file is one migration. This article covers the file, the upload, and the batch page. Everything else (what's supported, sync modes, following and re-running a migration) works the same as for a single mailbox, and is covered in Migrating your email with the Imapsync Migration Tool.
Contents
- Before you start
- Prepare your CSV file
- Passwords with commas, quotes or spaces
- Upload and check the preview
- The batch page
- CSV upload errors
Before you start
Check the steps in Before you start in Migrating your email with the Imapsync Migration Tool for every mailbox in your file. In particular, every new mailbox must already exist, and every old mailbox must allow IMAP access.
| Limit | Value |
|---|---|
| Rows per upload | 100 |
| File size | 1 MB |
| File format | CSV saved as UTF-8 |
More than 100 mailboxes? Split them across several files and upload each one separately. Each upload becomes its own batch. Only two migrations run at the same time, so the rest wait as Scheduled and start by themselves.
Bulk migrations always use Sync All, plus any flags a row has. When a file is uploaded, the rest of the form (server details, passwords, sync mode and advanced options) is ignored.
Prepare your CSV file
The file has seven columns, in this order:
| Column | What goes in it | Required |
|---|---|---|
src_host | Old mail server, for example hostold.domain.tld. | Yes |
src_email | The old mailbox address. | Yes |
src_password | The old mailbox password (or app password). | Yes |
dest_host | Your MyHost mail server, for example hostnew.domain.tld. | Yes |
dest_email | The new mailbox, which must already exist. | Yes |
dest_password | The new mailbox password. | Yes |
extra_flags | Extra options for this row only, for example --maxage 30. Leave empty if not needed. | No |
A header row is optional: it is detected and skipped. Only the flags in a row are used for that row.
src_host,src_email,src_password,dest_host,dest_email,dest_password,extra_flags
hostold.domain.tld,user_old@domain.com,ExamplePassword1,hostnew.domain.tld,user_new@domain.com,ExamplePassword2,
hostold.domain.tld,user_old2@domain.com,ExamplePassword3,hostnew.domain.tld,user_new2@domain.com,ExamplePassword4,--maxage 30
Gmail mailboxes need --gmail1 in their row. A bulk migration only uses the flags in each row, so put --gmail1 in extra_flags for every Gmail row, and use an app password as src_password. Without it, Gmail mail is copied two or three times. Read Migrating your email from Gmail for how to create the app password.
imap.gmail.com,user_old@gmail.com,abcdefghijklmnop,hostnew.domain.tld,user_new@domain.com,ExamplePassword2,--gmail1
Download CSV Template on the form gives you a ready-made file to fill in.

Editing the file in Excel
Excel is the most common cause of a broken CSV file. It can save the file in the wrong format and change values it thinks are mistakes.
- When saving, choose CSV UTF-8 (Comma delimited). Plain CSV (Comma delimited) is not UTF-8, and names or passwords with special characters come out garbled.
- Check passwords after saving. Excel can change some characters, such as straight quotes into curly quotes.
- If you can, edit the file in a plain text editor instead.
Whatever you use, the preview after upload shows exactly what was read, so you can check it there (see Upload and check the preview below).
Passwords with commas, quotes or spaces
Most passwords can be typed straight into the file. Two characters need care, because CSV uses commas to separate columns and double quotes to group text.
| If the password contains | Write it in the CSV as |
|---|---|
a comma, for example pa,ss | "pa,ss" |
a double quote, for example pa"ss | "pa""ss" (wrap the password, and type the inner quote twice) |
- Double quotes are the only wrapper the tool recognises. Single quotes become part of the password:
'password123'is saved with the apostrophes. - Spaces are kept exactly as typed. In
...,user@old.com, pass ,mail.new.com,...the password ispass, with a space at each end. Don't add spaces around a password unless they are part of it. - Server names and email addresses have spaces trimmed automatically. Passwords are left untouched.
Not sure you got it right? Upload the file and use Show passwords in the preview to check each one.

Upload and check the preview
- Open the New Email Migration form and expand Bulk Migration.
- Under Upload CSV File, click Choose File and pick your file.
- The preview shows "N migrations ready" and one row per migration.
- Click Show passwords to check every password came through exactly. Click it again to hide them.
- Fix any mistake directly in the table, or remove a row you don't want. If you edit a password here, type it plainly: the quoting rules are only for the file.
- Click Validate Rows to check every row is filled in correctly.
- Click Test All Credentials to log in to both mailboxes for every row. To test one row only, click its status.
- If you might run the batch again, tick Store passwords for one-click re-runs. It applies to every row.
- Click Start Migration.
Rows the tool cannot read are listed in a yellow warning above the table.



Start Migration always checks the format of every row first, even if you skipped Validate Rows. If a row has a problem, nothing starts. A red summary appears, for example "2 row(s) failed validation. Fix the entries below and re-upload.", and each bad field shows its own message. Fix them in the table and click Start Migration again.

The batch page
A successful upload opens the batch page. It shows the Batch reference (for example BAT-12345-ABC), how many Migrations scheduled, whether Passwords stored is Yes or No, and a table of the migrations in the batch.

Each migration in the batch has its own status and page, and works like a single migration. To follow one, click its Description. On the Email Migrations page, the whole batch shows as one Batch row.
If some rows were rejected, the page says "N of M migrations were scheduled. See the failed rows below." and lists them under Rows that couldn't be scheduled, with the CSV row number and the Error for each. Fix those rows and upload a new file with only them.
Re-run Batch runs every migration in the batch again, once they have all finished. It only works for migrations whose passwords were stored and have not expired. Any others are skipped: use Clone on each of those and type the passwords again.
CSV upload errors
| What the form says | What to do |
|---|---|
| "The uploaded file is empty. Please check your CSV and try again." | Check you picked the right file, then upload it again. |
| "The CSV file does not contain any data rows. Please add at least one migration." | Add at least one row under the header. |
| "This upload has N migrations. A maximum of 100 are allowed per upload: remove some rows or split the file into smaller ones." | Split the file into several files of up to 100 rows. |
| "The uploaded file is too large. Maximum size is 1 MB." | Split the file into smaller files. |
| "The CSV file could not be processed. Please check its contents and try again." | Check there are seven columns and the quoting rules above, save as CSV UTF-8, and upload again. |
| "No migrations were scheduled because every row failed validation - row N: <reason>; ... Fix these rows and try again." | Fix the rows listed, then upload again. |
Strange characters in the preview? If names, addresses or passwords show odd symbols, the file was not saved as UTF-8. The rows then fail with errors such as "Email local-part contains invalid characters". Save the file again as CSV UTF-8 (Comma delimited) and upload it again.


Problems after the migrations start are covered in Troubleshooting email migrations.