Skip to content

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 haveUse
Mailboxes at another provider you can still sign in toMoving mailboxes here — copies every folder over IMAP and keeps copying until you switch the MX.
An export file: Google Takeout, .mbox, .emlImport 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 mailboxesCreate 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

FileFromWhere the mail lands
.zip or .tgz Google TakeoutGmail or a Google Workspace accountAs 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.
.mboxApple Mail (Mailbox → Export Mailbox), Thunderbird (ImportExportTools NG), most mail programsA folder named after the file: Work.mbox → Work.
.emlOne saved messageInbox.
.zip of the aboveA folder of .eml files, several .mbox files, Apple Mail .mbox bundles, a zipped Thunderbird Mail folderThe folder tree in the ZIP: Clients/2024.mbox → Clients/2024; a loose .eml goes into the folder it is in.
.gzA gzipped .mboxA 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

  1. 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.
  2. 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.
  3. 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.
  4. 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

  1. Choose Mail

    Sign in to the Google account and open takeout.google.com. Choose Deselect all, then tick only Mail.
  2. Create the export

    Choose .zip or .tgz and the largest file size, and create the export.
  3. 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 From line, otherwise its Date header).
  • Read, answered, flagged and draft state where the file has it (mbox Status and X-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.

Who can import

The person who uses the mailbox, from webmail, and team members who manage mailboxes, from the dashboard. Imports and exports started from the dashboard are written to the team’s audit log.

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 .mbox file, or
  • All folders — a .zip with one .mbox per 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.

SizeWhat happens
Up to 500 MBDownloads straight away with Download.
Over 500 MBPrepare 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.

Next steps

Was this page helpful?

Related

Background reading