Launch offer: 20% off every migration plan until 31 January 2027. See prices
//IMAP → Google Workspace
6 min read
Cross-platform·Cross-Platform

IMAP → Google Workspace

Migrate email from any IMAP-compatible server — cPanel, Dovecot, Kerio, MDaemon — into Google Workspace Gmail.

IMAP → Google Workspace Migration Guide

Migrate email from any IMAP-compatible mail server into Google Workspace Gmail. This route works with cPanel/Plesk-hosted mail, Dovecot, Cyrus, Kerio, MDaemon, and any other IMAP server. Only email is migrated — IMAP does not carry calendar or contact data.


Prerequisites

Source mail server

  • IMAP access enabled on port 993 (SSL) or port 143 (STARTTLS)
  • Either an admin/master account with proxy access to all mailboxes, or individual credentials for each user
  • Firewall allows outbound connections from the Aatrex host to your IMAP server

Destination — Google Workspace

  • Super Administrator role
  • Google Workspace licences assigned to all destination users
  • All destination Gmail accounts must already exist before migration starts

Step 1: Set Up Google Workspace Destination

1a. Create a Google Cloud Project

  1. Sign in to console.cloud.google.com as a Super Administrator.
  2. Click Select a project → New Project, name it Aatrex IMAP Migration, and click Create.
  3. Go to APIs & Services → Library and enable:
    • Gmail API
    • Admin SDK API

1b. Create a Service Account

  1. Go to APIs & Services → Credentials → Create Credentials → Service account.
  2. Name it aatrex-imap-migration and click Create and Continue → Done.
  3. Click the service account → Keys tab → Add Key → Create new key → JSON. Save the JSON file.
  4. Copy the Unique ID (numeric string) from the service account detail page.

1c. Grant Domain-Wide Delegation

  1. In the Google Admin console (admin.google.com), go to Security → Access and data control → API controls → Manage domain-wide delegation.
  2. Click Add new and enter:
    • Client ID: the service account Unique ID
    • OAuth Scopes:
      https://mail.google.com/,
      https://www.googleapis.com/auth/admin.directory.user.readonly
      
  3. Click Authorise.

Step 2: Create a Migration Project

  1. In Aatrex, click Projects → Create Project.
  2. Select IMAP → Google Workspace as the migration type.
  3. On the Source credentials step:
    • Connection type: IMAP
    • Host: your IMAP hostname (e.g. mail.yourtenant.com)
    • Port: 993 (SSL recommended)
    • Authentication: Admin account if your server supports master credentials, or Per-user credentials if not
  4. On the Destination credentials step:
    • Upload the Google service account JSON key file
    • Enter the Admin email — a Super Administrator UPN. The service account impersonates this user to write mail into destination Gmail accounts.
  5. Click Test Connection → Save Project.

Step 3: Add Users

Option A — Admin Account Mode (auto-discover)

If your IMAP server supports master credentials:

  1. Click Scan → Discover Users. Aatrex queries the IMAP server for all available mailboxes.
  2. Click Auto Map to match source to destination Gmail addresses by username.

Option B — Per-User Credentials Mode (CSV import)

If your server does not support admin proxy access:

  1. Prepare a CSV file — no header row, three columns:
    source_email,source_password,destination_gmail
    john.smith@oldmail.com,P@ssw0rd123,john.smith@yourtenant.com
    alice.jones@oldmail.com,S3cretPass,alice.jones@yourtenant.com
    
  2. In your project, click Scan → Import Users and upload the CSV.
  3. Aatrex validates each credential against the IMAP server and flags any that fail authentication.

Step 4: Start Migration

  1. Select users and click Migrate.
  2. Choose a mode:
    • Full — migrates all folders and messages, preserving folder hierarchy and read/unread status.
    • Date range — migrates messages received after a specified date. Use for incremental pre-cutover passes.
  3. Click Start Migration.

Tip: Run a full migration pass several days before MX cutover, then run a date-range incremental pass in the final 24–48 hours to capture mail received during migration.


Step 5: MX Record Cutover to Google

When all users are migrated and the final incremental pass is complete:

  1. Update your domain's MX record to:
    Priority 1:  ASPMX.L.GOOGLE.COM
    Priority 5:  ALT1.ASPMX.L.GOOGLE.COM
    Priority 5:  ALT2.ASPMX.L.GOOGLE.COM
    
  2. Add or update SPF: v=spf1 include:_spf.google.com ~all
  3. Enable DKIM signing in the Google Admin console: Apps → Google Workspace → Gmail → Authenticate email → Generate new record → Start authentication.
  4. Lower MX TTL to 300 seconds at least 48 hours before cutover for fast propagation.

What Is and Is Not Migrated

ItemMigrated
Email messages (all folders)✅ Yes
Read / unread status✅ Yes
Message timestamps✅ Yes
Folder hierarchy✅ Yes
Calendars❌ No — IMAP does not carry calendar data
Contacts❌ No — IMAP does not carry contact data
Mail rules and signatures❌ No — must be recreated manually in Gmail
Folder permissions / delegates❌ No — not supported via IMAP

See What Moves and What Doesn't for every path.


Common Issues

IMAP connection refused Confirm port 993 is open from the Aatrex host to your mail server. Some hosting providers (cPanel, Plesk) block IMAP access from non-listed IPs — check your firewall or hosting control panel.

All user credentials fail If using admin/master credentials, verify the format your server requires. cPanel uses user@domain.com+adminpassword style logins; Plesk typically uses user@domain.com with the reseller password. Consult your hosting panel documentation.

Gmail API quota exceeded Google limits Gmail API write operations per day per service account. For organisations over 200 users, contact Google Support to request a quota increase before migration. Aatrex automatically backs off when quota errors are returned and retries after the quota window resets.

Folders appear flat after migration Some IMAP servers export subfolders with dots (.) rather than slashes as the hierarchy separator. Aatrex detects the separator automatically, but if labels appear incorrectly flattened, contact Aatrex support with the raw folder list from your server.

PreviousMicrosoft 365 → Google WorkspaceNext Teams, Google Chat or Webex → Slack, Google Chat or Teams

Related articles