---
title: "Bring your old mailbox"
description: "Bring the mail you already have: copy it straight from the old mailbox by signing in, or upload a Google Takeout export or an .mbox file, threaded and dated as it was."
url: "https://nextmail.sh/docs/knowledge/trust/import"
area: "Knowledge base"
category: "Moving in"
status: "live"
---

# Bring your old mailbox

Bring the mail you already have: copy it straight from the old mailbox by signing in, or upload a Google Takeout export or an .mbox file, threaded and dated as it was.

## Details

- Where it lives: Migrations → From a file. Choose the address the mail belongs to, choose the files and start. The upload goes up in parts, so a dropped connection resumes from the last part that arrived rather than from the beginning, and the page can be closed once the import is running.
- What it reads: a Google Takeout archive from Gmail, including one mailbox split across several parts, an .mbox from Apple Mail, Thunderbird or most desktop apps, single .eml files, and .zip or .tgz archives holding any of those, up to 100 GB a file. An export taken from Nextmail comes back with its labels.
- Threads come back as they were. A conversation is anchored on the first entry of a message’s References header, falling back to In-Reply-To and then to the message’s own id, so an import that keeps those three headers rebuilds each thread exactly, and imported mail threads with mail that arrives afterwards because both go through the same rule. Dates come off the message, so a thread from 2019 sorts as 2019.
- Filing follows the source. Mail that was in your Gmail inbox lands in Inbox with its unread state, sent mail lands in Sent and everything else lands in Archive, with Gmail labels kept as labels up to the workspace limit of 50. Thunderbird’s read and starred flags come across. Spam and trash stay behind unless you switch them on, and chats and drafts are left out.
- It is quiet. An imported message is not scored by AI, not summarised, not run through your rules, not forwarded, not announced to webhooks or devices, and nothing is sent on its behalf. Encrypted messages stay encrypted, exactly as they were sent.
- Running it twice adds nothing. Messages match on their message id and sender rather than on any id generated here, so a second run skips every copy already in the mailbox, and an import interrupted by a restart picks up from its last checkpoint. The list shows a running count, and every message that did not come through is listed with the reason.
- How to produce the file. Gmail: at takeout.google.com pick Mail only and a .zip, then upload every part Google sends, because one mailbox is often split across several. Apple Mail: select the mailbox, choose Mailbox then Export Mailbox, and zip the .mbox folder it writes. Thunderbird: zip the Mail folder inside your profile. Desktop Outlook writes a .pst, which cannot be read yet, so export to .mbox first. The same three lines sit beside the file picker in the app, so nobody has to leave the page to find them.
- HEY: in a desktop browser, open app.hey.com/accounts and choose Export Your Data. HEY emails a link when the .mbox file is ready, and it uploads like any other export. The app shows this line beside the file picker as well.
- Proton Mail: run Proton's Export Tool, choose Backup, and upload a .zip of the folder it writes. Its metadata files bring folders, labels, stars and read state across with each message.
- Fastmail: open Settings, then Migration, then Export, and export one folder at a time, up to 4 GB each. Upload all the zips in one import.
- From a live mailbox: Migrations → From a mailbox. Pick the old provider, enter the old address and an app password, and Check signs in once to show the folders and how many messages they hold. Then choose the address the mail lands on and start. The old mailbox is only ever read: every folder is opened read-only, and nothing in it is moved, marked or deleted.
- What a live import brings: each folder becomes a label, read and starred state come across, sent mail lands in Sent, and a message the address already holds is skipped, so a live import after a file import adds only what is missing. A Gmail mailbox is read from All Mail with its labels. Spam and trash stay behind unless you switch them on, and drafts are left out.
- It waits by itself. When the old provider slows the import down, such as Gmail at its daily limit, the import pauses, History shows when it carries on, and it picks up at the same folder and message. If the app password stops working, History asks for a new one. Run again is offered for 30 days after an import finishes and copies only the mail that arrived since.
- The password. An app password is made at the old provider and can be revoked there at any time. It is kept sealed until the import finishes, for 30 days at most, then wiped, and it is never written to a log. Only port 993 with TLS, or port 143 with STARTTLS, is used, and each person may make 10 sign-in attempts an hour.
- Outlook.com and Microsoft 365 take no app password, so they open with a Microsoft sign-in instead, which lets Nextmail read the mailbox, its contacts and its calendars and change nothing. Some company accounts need their admin to approve the app once, and the page gives the link to send them.
- Contacts and calendars come in the same flow. iCloud, Fastmail and Yahoo give them over the same app password, Microsoft over the same sign-in, and for Gmail they are read from the .ics and .vcf files inside a Google Takeout archive. Imported contacts join no audience, and imported events email nobody, now or when you change them later, unless you switch Notify guests on for that change.
- A calendar file or a contacts file on its own: upload an .ics file under Import in the Calendars dialog of the Calendar page, or a .vcf file with Import contacts on the Contacts page. An event whose UID is already in the workspace is skipped and counted, never overwritten, and each import can be undone, which removes only what it added.

## Step by step for your provider

- [Import from Gmail](https://nextmail.sh/docs/knowledge/trust/import/gmail.md): Copy a Gmail or Google Workspace mailbox with an app password, labels included.
- [Import from Outlook and Microsoft 365](https://nextmail.sh/docs/knowledge/trust/import/outlook.md): Copy an Outlook.com or Microsoft 365 mailbox with a Microsoft sign-in, no password needed.
- [Import from iCloud Mail](https://nextmail.sh/docs/knowledge/trust/import/icloud.md): Copy an iCloud mailbox, its contacts and its calendars with an app-specific password.
- [Import from Yahoo Mail](https://nextmail.sh/docs/knowledge/trust/import/yahoo.md): Copy a Yahoo mailbox, its contacts and its calendars with an app password.
- [Import from Fastmail](https://nextmail.sh/docs/knowledge/trust/import/fastmail.md): Copy a Fastmail mailbox, its contacts and its calendars with an app password.
- [Import from AOL Mail](https://nextmail.sh/docs/knowledge/trust/import/aol.md): Copy an AOL mailbox with an app password.
- [Import from Zoho Mail](https://nextmail.sh/docs/knowledge/trust/import/zoho.md): Copy a Zoho Mail mailbox with an app password.
- [Import from any other mail server](https://nextmail.sh/docs/knowledge/trust/import/other.md): Copy a mailbox from any provider or server that offers IMAP.

## From a program

- `GET /imports/mailbox-settings` finds the mail server for an address, `POST /imports/mailbox/check` signs in and counts the folders, and `POST /imports/mailbox` starts the import. All three need `threads:write`. `POST /imports/{id}/resume` carries a waiting import on.
- `POST /calendar/imports` takes an .ics file and `POST /contacts/imports` a .vcf file as the request body. Each has a list, a read by id and an undo beside it.
- The SDKs and the CLI carry the same calls: `imports.discoverMailbox`, `checkMailbox`, `connectMailbox` and `resume`, `calendar.importIcs` and `contacts.importVcf`, with `listImports`, `getImport` and `undoImport` on both.
- An assistant connected over MCP can look a server up and read or undo calendar and contacts imports. It never starts a live import, because the password of the old mailbox must not pass through a tool call.
