MailtoPst

How to Migrate Email to the Cloud: Gmail, Office 365, and IMAP — The Complete Guide

Step-by-step guide to migrating your email archives to cloud platforms including Gmail, Microsoft 365, and IMAP servers. Covers PST, MBOX, EML imports and best practices.

13 min read Updated March 2026
🛡️ GDPR Compliant 🔒 TLS 1.3 Encryption 🇪🇺 Hosted in EU 🇫🇷 Built in France 🗑️ Auto-delete 24h

Why Migrate Email to the Cloud?

The shift from on-premises email to cloud platforms has accelerated steadily over the past decade. Organizations of every size are moving to Gmail (Google Workspace), Microsoft 365, or other cloud-based email services for compelling reasons: reduced infrastructure costs, automatic updates, built-in security, anywhere access, and simplified administration.

But migration is rarely as simple as flipping a switch. Years or decades of accumulated email data — stored in PST files, MBOX archives, OST caches, and local mail directories — need to be transferred reliably to the new platform. Lose a folder, corrupt an attachment, or scramble the dates on a thousand messages, and your migration becomes a costly headache.

This guide covers the practical steps for migrating email to cloud platforms. Whether you are moving a single personal mailbox or thousands of corporate accounts, you will find the strategies, tools, and pitfalls to be aware of.

Assessing Your Current Email Environment

Inventory Your Email Data

Before you start any migration, take stock of what you have. This means identifying:

  • File formats in use — Are your archives in PST, MBOX, EML, OST, MSG, or a mix?
  • Total data volume — How many gigabytes of email data need to move?
  • Number of mailboxes — Is this a single user or hundreds of accounts?
  • Folder structures — Complex folder hierarchies need careful handling
  • Special items — Contacts, calendars, tasks, and notes may also need migration
  • Attachments — Large attachments can significantly increase migration time and storage needs

Identify Source Platforms

Different source platforms export data in different formats:

Source PlatformExport FormatNotes
Outlook (Windows)PSTMost common corporate format
Outlook (Mac)OLMDifferent from PST, requires conversion
ThunderbirdMBOXOne file per folder
Apple MailEMLXApple-specific single message format
GmailMBOXVia Google Takeout
Exchange ServerPST or EMLAdmin tools can export individual mailboxes
ZimbraTGZ (contains EML)Extract before migration
Lotus NotesNSFRequires specialized conversion

Document Your Requirements

Write down the non-negotiable requirements before you start:

  • Must all historical email be migrated, or only messages from a certain date range?
  • Are there legal hold or compliance requirements (GDPR, HIPAA, SOX)?
  • What is the acceptable downtime window?
  • Do users need to keep their existing folder structures?
  • Are shared mailboxes, distribution lists, or public folders involved?

Choosing Your Cloud Destination

Microsoft 365 (Office 365)

Microsoft 365 is the natural destination for organizations already using Outlook. It supports direct PST import through several methods:

  • Outlook desktop client — Import PST directly through File > Open & Export
  • Network upload — Upload PSTs to Azure and import via the Microsoft 365 compliance center
  • Drive shipping — Ship physical drives to Microsoft for large-scale imports
  • Third-party migration tools — Tools like BitTitan MigrationWiz, CodeTwo, or Quest

For non-PST sources, you will first need to convert to PST. You can convert MBOX to PST or convert EML to PST before importing.

Gmail (Google Workspace)

Gmail accepts email imports through:

  • IMAP migration — Google Workspace Migration for Microsoft Exchange (GWME)
  • Google Workspace Migration tool — Supports PST and Exchange imports
  • Email migration service — Built into the Google Admin console
  • IMAP client upload — Use an IMAP client to upload messages to Gmail

For PST archives going to Gmail, you have two paths: use Google’s migration tool directly, or convert PST to MBOX and use an IMAP client to upload the messages.

Generic IMAP Servers

If your destination is a generic IMAP server (Dovecot, Courier, Cyrus, Postfix, etc.), the approach is:

  1. Convert your archives to EML format — PST to EML, MBOX to EML, or OST to EML
  2. Use an IMAP client or migration tool to upload EML files to the server
  3. Verify folder structure and message integrity

EML is the most universally accepted format for IMAP-based imports because each message is a self-contained file that maps directly to a single IMAP message.

Pre-Migration Preparation

Clean Up Before You Migrate

Migration is the perfect opportunity to reduce your email footprint:

  • Delete spam and junk — Do not waste time and bandwidth migrating garbage
  • Remove duplicates — Deduplication can significantly reduce data volume
  • Archive or remove old attachments — Large attachments consume migration time and cloud storage
  • Consolidate PST files — Users often have multiple PST files; merge them when practical
  • Verify file integrity — Run integrity checks on PST files using Microsoft’s scanpst.exe or equivalent tools

Create a Migration Schedule

For organizational migrations:

  1. Pilot phase — Migrate 5-10 test mailboxes first to identify issues
  2. Department phases — Migrate in waves to limit support burden
  3. Communication plan — Notify users before, during, and after their mailbox migration
  4. Rollback plan — Keep source data intact until migration is verified

Back Up Everything

Never start a migration without a complete backup of your source data. PST files should be copied to a separate location, MBOX files duplicated, and any server-side data exported. Migration tools can have bugs, networks can fail, and conversions can occasionally produce unexpected results.

Migrating PST Files to the Cloud

Method 1: Outlook Desktop Import to Microsoft 365

The simplest approach for small-scale PST migration to Microsoft 365:

  1. Configure the Outlook desktop client with the Microsoft 365 account
  2. Open File > Open & Export > Import/Export
  3. Select “Import from another program or file”
  4. Choose “Outlook Data File (.pst)”
  5. Browse to your PST file
  6. Select the folders to import
  7. Wait for synchronization to cloud

This works well for individual mailboxes under 10 GB. For larger migrations, it is slow and error-prone.

Method 2: Microsoft 365 Network Upload

For bulk PST imports to Microsoft 365:

  1. Obtain a SAS URL from the Microsoft 365 compliance center
  2. Install the Azure AzCopy tool
  3. Upload PST files to Azure Blob storage
  4. Create a CSV mapping file linking PST files to target mailboxes
  5. Create and run an import job in the compliance center
  6. Optionally filter by date range or message type

This method is designed for enterprise-scale migrations and can handle terabytes of PST data.

Method 3: Convert and Upload via IMAP

For cloud platforms that do not support direct PST import:

  1. Convert PST to EML using MailtoPst
  2. Set up an IMAP connection to your cloud mailbox
  3. Use an email client or migration tool to upload EML files
  4. Verify folder structure and message counts

This approach works for any IMAP-compatible cloud service, including Gmail, Yahoo, and generic IMAP servers.

Migrating MBOX Archives to the Cloud

MBOX to Microsoft 365

Microsoft 365 does not natively import MBOX files. You have two options:

  1. Convert to PST firstConvert MBOX to PST using MailtoPst, then import the PST into Outlook or use the network upload method
  2. Convert to EML and upload via IMAPConvert MBOX to EML, then use an IMAP client

MBOX to Gmail

Gmail has some built-in support for MBOX import through Google Workspace tools. However, for personal Gmail accounts or when the built-in tools do not work:

  1. Install Thunderbird and import the MBOX files
  2. Configure Thunderbird with your Gmail account via IMAP
  3. Drag messages from local MBOX folders to Gmail IMAP folders
  4. Wait for synchronization to complete

This manual method works but is slow for large archives. For better performance, use a dedicated migration tool.

MBOX to Generic IMAP

  1. Convert MBOX to EML for individual message files
  2. Use a tool like offlineimap, isync, or a graphical IMAP client
  3. Upload EML files to the appropriate IMAP folders
  4. Verify message counts and spot-check content

Migrating OST Files to the Cloud

OST files present a unique challenge because they are tied to a specific Outlook profile. You cannot simply import an OST file into a cloud account. The process always requires conversion first.

Step 1: Convert OST to a Portable Format

Choose based on your destination:

Step 2: Import to Cloud

Follow the appropriate import procedure for your chosen destination, as described in the sections above.

When OST Migration Is Necessary

OST migration to the cloud typically happens when:

  • An Exchange server is being decommissioned and some mailboxes were not migrated before shutdown
  • An employee left and their Exchange account was deleted, but the OST file remains on their workstation
  • Moving from an on-premises Exchange to Office 365 and cached data needs to be preserved

Handling Large-Scale Migrations

Bandwidth Planning

Calculate your migration bandwidth needs:

  • Data volume: Total size of all email archives
  • Available bandwidth: Upload speed to the cloud provider
  • Migration window: Available hours for migration
  • Parallel streams: How many simultaneous uploads your network and cloud account support

For a 100 GB migration over a 100 Mbps connection, expect roughly 3-4 hours of transfer time under ideal conditions. Real-world performance will be slower due to protocol overhead, throttling, and processing time.

Throttling and Rate Limits

Cloud providers impose rate limits on imports:

  • Microsoft 365: PST import can process approximately 24 GB per day per import job. Multiple jobs can run in parallel.
  • Gmail: Google Workspace Migration tool processes approximately 1-2 GB per user per day depending on message size and count.
  • IMAP: Varies by provider; most providers throttle to prevent abuse.

Plan your migration timeline around these limits.

Error Handling and Retry Logic

Large migrations will encounter errors. Your process should include:

  • Logging of every message processed (success or failure)
  • Automatic retry for transient errors (network timeouts, temporary throttling)
  • A separate queue for permanently failed messages that need manual intervention
  • Post-migration validation comparing source and destination message counts

Post-Migration Verification

Message Count Verification

Compare the total number of messages in the source and destination for each folder. A discrepancy indicates missed or duplicate messages.

Content Spot-Checking

Randomly sample messages across different folders and date ranges:

  • Do attachments open correctly?
  • Are dates and times preserved?
  • Is the folder structure intact?
  • Are sender and recipient fields correct?
  • Do international characters (accents, CJK, etc.) display properly?

Metadata Verification

Check that message metadata survived the migration:

  • Read/unread status
  • Flags and categories
  • Sent dates and received dates
  • Message threading and conversation grouping

Security and Compliance During Migration

Data Protection

Email archives often contain sensitive data — personal information, financial records, legal communications, health records. During migration:

  • Use encrypted connections (HTTPS/TLS) for all file transfers
  • Ensure the migration tool does not store copies of your data
  • Verify the tool’s data handling policies (GDPR, HIPAA compliance)
  • Use a migration tool with EU-based servers if your organization is subject to European data protection regulations

MailtoPst processes all conversions on GDPR-compliant EU servers with automatic file deletion after 24 hours. No email content is ever read, analyzed, or shared.

Chain of Custody

For legal and compliance purposes, document:

  • When the migration started and completed
  • Which tool was used and its version
  • Source and destination details
  • Any errors encountered and how they were resolved
  • Verification results

Retention Policies

After migration, configure appropriate retention policies in your cloud platform. Most cloud email platforms offer built-in retention and archiving features that can replace your previous on-premises archiving solution.

Common Migration Pitfalls

Duplicate Messages

Interrupted migrations that are restarted often produce duplicates. Use deduplication tools or configure your migration to skip existing messages based on Message-ID headers.

Missing Folders

Some migration tools flatten folder hierarchies or skip empty folders. Verify your folder structure after migration and recreate any missing folders manually.

Date and Time Issues

Timezone handling is a common source of bugs. Messages that show the wrong date after migration are usually affected by incorrect timezone conversion. Verify dates on a sample of messages spanning different timezones.

Attachment Size Limits

Cloud platforms impose maximum message and attachment size limits. Messages that exceed these limits will fail to import. Identify oversized messages before migration and decide whether to exclude them, compress attachments, or split them.

Character Encoding

Messages in non-Latin character sets (Chinese, Japanese, Korean, Arabic, Hebrew, Cyrillic) can display garbled text after migration if the tool does not handle encoding conversions correctly. Test with a sample of international messages first.

Frequently Asked Questions

Can I migrate PST files directly to Gmail?

Not directly. Gmail does not natively import PST files for personal accounts. For Google Workspace (business) accounts, the Google Workspace Migration tool supports PST import. For personal accounts, convert PST to MBOX first, then use Thunderbird as an intermediary to upload via IMAP, or use a third-party migration tool.

How long does an email migration to the cloud take?

It depends on data volume, bandwidth, and the cloud provider’s rate limits. A 10 GB mailbox typically takes a few hours. Enterprise migrations of hundreds of gigabytes can take days or weeks, especially with Microsoft 365’s import throttling. Plan for longer than you think.

Will I lose any data during migration?

A properly executed migration preserves all email content, attachments, and folder structure. The most common data loss scenarios are: interrupted migrations, exceeding cloud attachment size limits, and encoding issues with international characters. Always verify with spot checks after migration.

Should I convert OST to PST before migrating to the cloud?

Yes, for Microsoft 365 migration. Convert OST to PST first, then use any standard PST import method. For other cloud platforms, convert OST to EML for the most portable format.

Is it safe to migrate sensitive emails to the cloud?

Cloud platforms like Microsoft 365 and Google Workspace offer enterprise-grade security, including encryption at rest and in transit, advanced threat protection, and compliance certifications. For the migration process itself, use tools that encrypt data in transit and do not retain copies. MailtoPst uses GDPR-compliant EU servers with automatic 24-hour file deletion.

Can I migrate contacts and calendars along with email?

PST files can contain contacts and calendar data, and Microsoft 365’s import tools can import these items. For other platforms, contacts are typically migrated via CSV export/import, and calendars via ICS/iCal format. These are usually separate processes from email migration.

What happens to my old email data after migration?

Keep your source data (PST files, MBOX archives, etc.) for at least 30-90 days after migration while you verify everything transferred correctly. After verification, archive the source files according to your organization’s retention policy. Do not delete source data until you are confident the migration is complete and correct.

Related conversions

Related help articles

Ready to convert your emails?

First conversion free. No credit card required.