# Import email from Gmail, IMAP or .mbox · cloudmail

> Import old email from Google Takeout, .mbox and .eml files or any IMAP account. Labels, threads and read state come with it, and re-runs add no duplicates.

Canonical: https://trycloudmail.com/features/email-import
Last updated: 2026-11-24

**Import your old email from Gmail or any IMAP account.** cloudmail imports old mail from a Google Takeout .mbox file, a .zip of .eml files or any IMAP account. Labels, threads, read and starred state and attachments come with it, and running an import twice adds no duplicates.

## How an import works

- **Files up to 50 GB**: Upload an .mbox, a .zip of .eml files or a single .eml from the browser or the CLI.
- **IMAP, read-only**: Connect with an app password. Folders are opened read-only, so nothing on the old account changes.
- **Gmail labels kept**: Inbox, Sent, Spam and Trash become folders, and your own labels stay labels.
- **No duplicates**: Messages are matched by Message-ID, so running an import again adds nothing.
- **Quiet**: Imported mail triggers no forwarding, auto-replies, webhooks or notifications.
- **Resumable**: An interrupted import picks up where it stopped, and you can pause or cancel it.

- [Moving from Google Workspace](https://trycloudmail.com/compare/google-workspace)
- [Moving from Microsoft 365](https://trycloudmail.com/compare/microsoft-365)
- [Moving from Fastmail](https://trycloudmail.com/compare/fastmail)
- [Moving from mailcow](https://trycloudmail.com/compare/mailcow)

## Import from the command line

```bash
cloudmail import mbox takeout.mbox --mailbox you@yourdomain.com
cloudmail import status --wait
```

In the docs: [Importing mail](https://github.com/cloudmail-hq/cloudmail/blob/main/docs/reference.md#importing-mail).

## Questions about importing mail

### How do I move from Gmail or Google Workspace?

Export your mail with Google Takeout and import the .mbox file, or connect Gmail over IMAP with an app password. Then the setup wizard points your domain's MX records at Cloudflare.

### How do I move from Outlook or Microsoft 365?

Import each mailbox over IMAP, or from .mbox and .eml exports.

### Is my IMAP password stored?

It is encrypted while the import runs and deleted when the import completes, fails or is cancelled.

### Is there a size limit?

A file can be up to 50 GB. A single message over 25 MB is skipped and counted.

## Related features

- [Mail client](https://trycloudmail.com/features/webmail) - Threads, labels, search, snooze, scheduled send with undo, rules and templates.
- [Custom domains](https://trycloudmail.com/features/custom-domain-email) - Every domain you own in one deployment, with aliases, catch-alls and live DNS checks.
- [Shared inboxes](https://trycloudmail.com/features/shared-inbox) - support@ and sales@ for the whole team, with a role for each person.

## Related

- [Features](https://trycloudmail.com/features)
- [Pricing](https://trycloudmail.com/pricing)
- [Docs](https://trycloudmail.com/docs)
