Import and export mail
Bring old mail into a mailbox from a file — a Google Takeout, an .mbox from Apple Mail or Thunderbird, .eml files or a ZIP of them — and download a folder or a whole mailbox as .mbox files. For setting up a whole team, create the mailboxes from a CSV first.
Which way to move mail#
| You have | Use |
|---|---|
| Mailboxes at another provider you can still sign in to | Moving mailboxes here — copies every folder over IMAP and keeps copying until you switch the MX. |
| An export file: Google Takeout, .mbox, .eml | Import from a file, below. |
| Mail only on a laptop (an old Apple Mail or Thunderbird archive) | Export it from the mail program as .mbox, then import the file. |
| A list of people who need mailboxes | Create the mailboxes from a CSV first, then move or import their mail. |
Create the mailboxes from a CSV#
Before any mail moves, every person needs a mailbox. Mailboxes → Import from CSV in the dashboard (or POST /mailboxes/bulk, or poststack mailboxes import people.csv) creates them all at once from a spreadsheet with an address column and, optionally, name, quota, aliases, password and invite.
Put each person’s current (outside) address in invite instead of setting a password: they get an email with a one-time link, valid for 7 days, to choose their own password. Every row is checked before anything is created, and a row whose mailbox already exists is skipped, so the same file can be imported again after fixing a mistake. The columns, the dry run and the invite email are described in Create many mailboxes from a CSV.
Import from a file#
What can be imported
| File | From | Where the mail lands |
|---|---|---|
.zip or .tgz Google Takeout | Gmail or a Google Workspace account | As in a Gmail move: Inbox, Sent, Drafts, Spam and Trash in their own folders, everything else in the folder of its first label (or Archive), every label kept as a webmail label. |
.mbox | Apple Mail (Mailbox → Export Mailbox), Thunderbird (ImportExportTools NG), most mail programs | A folder named after the file: Work.mbox → Work. |
.eml | One saved message | Inbox. |
.zip of the above | A folder of .eml files, several .mbox files, Apple Mail .mbox bundles, a zipped Thunderbird Mail folder | The folder tree in the ZIP: Clients/2024.mbox → Clients/2024; a loose .eml goes into the folder it is in. |
.gz | A gzipped .mbox | A folder named after the file: Work.mbox.gz → Work. |
Up to 50 GB per file. A larger export (Google splits Takeouts into parts) is imported part by part — each part as its own import. Folder names such as Sent Items, Junk E-mail or Gesendet go into the mailbox’s own Sent, Junk, Drafts, Trash and Archive folders. Outlook .pst files and Apple Mail .emlx files are not read; export as .mbox instead.
Import
Open Import mail
In webmail: the account menu → Import mail. In the dashboard: Mailboxes, the mailbox’s menu → Import mail — or, on Move mailboxes here, Upload an export instead and choose the mailbox.Choose the folders
Keep the folders and labels from the export (the default), or Put everything in one folder and name it — useful for an old archive you want kept apart.Choose the file and start
Pick or drop the file and choose Start import. Keep the tab open while it uploads: a dropped connection carries on by itself, and Pause stops it for later. If the tab closes, open Import mail again, choose Continue upload and pick the same file — it continues where it stopped.Close the window
Once the upload is done the import runs on PostStack’s servers; the window can be closed. When it finishes you get an email (and, when you started it from the dashboard, a notification) with how many messages were added.
Getting a Google Takeout
Choose Mail
Sign in to the Google account and opentakeout.google.com. Choose Deselect all, then tick only Mail.Create the export
Choose.zipor.tgzand the largest file size, and create the export.Download it and import
Google emails you when it is ready — minutes to a day. Download each part and import it.
For a Google Workspace company, an admin can instead move every mailbox at once with the Google Workspace move, which needs no files.
What is kept
- Every message byte for byte, with its original date (from the mbox
Fromline, otherwise itsDateheader). - Read, answered, flagged and draft state where the file has it (mbox
StatusandX-Status, Thunderbird’s status, Gmail’s Unread and Starred). A message with no state at all is imported as read — it is old mail. - No duplicates. A message already in the target folder (same Message-ID, or same date and size when it has none) is not added again, so importing the same file twice, or a Takeout after an IMAP move, adds nothing twice.
- Nothing already in the mailbox changes.
Left out, and listed under the import’s Details with the reason: messages over 150 MB, Google Chat conversations in a Takeout, files that are not email, and messages the exporting program had already deleted.
While it runs
- A mailbox can have 3 imports open at a time. The list shows each one as Uploading, Waiting, Importing, Done, Mailbox full, Failed or Cancelled.
- Mailbox full: the import stops and keeps its place. Give the mailbox more storage and it continues within the hour. Imported mail counts towards the mailbox’s storage like any other.
- Cancel stops an import; what was already added stays. An upload left unfinished for 3 days is cancelled, and the uploaded file is deleted once an import ends.
Export#
In webmail, the account menu → Export mail; in the dashboard, the mailbox’s menu → Export mail. Under What to export choose:
- One folder — one
.mboxfile, or - All folders — a
.zipwith one.mboxper folder, nested as in the mailbox (INBOX.mbox,Sent.mbox,Clients/2024.mbox).
The files are standard mboxrd that Apple Mail, Thunderbird and other mail programs open, with read, answered and flagged state included. Importing an export into another PostStack mailbox gives back exactly the same messages.
| Size | What happens |
|---|---|
| Up to 500 MB | Downloads straight away with Download. |
| Over 500 MB | Prepare export builds it in the background. You get an email when it is ready; the file is kept for 7 days under Prepared exports, and a download that breaks off can be resumed. |
Up to 2 exports per mailbox can be prepared at a time. To keep mail for years regardless of what people delete, use the archive rather than periodic exports.
Calendars and contacts#
Files of mail are covered here; calendars (.ics) and contacts (.vcf) are imported and exported through the apps that sync them — see Calendars and contacts.
Troubleshooting#
This is not a mail export PostStack can read
The file is not a ZIP, tgz, gzip, .mbox or .eml. Upload a Google Takeout ( .zip or .tgz), an .mbox file, .eml files, or a ZIP of them.
There is no mail in this file
The archive has no .mbox or .eml files inside — for example a Takeout made without Mail ticked. Make the export again with Mail selected.
Files up to 50 GB can be imported
Split the export into parts — Takeout does this when you choose a smaller file size — and import each part.
The import says Mailbox full
Raise the mailbox’s storage (see Storage). The import continues from where it stopped within the hour.
Gmail labels did not become separate folders
That is on purpose: each message is stored once, in the folder of its first label, and carries all its labels as webmail labels. A message is never copied into several folders.