Skip to content
xaweho

Knowledge base · intermediate

Migrating from Google Workspace to Mailcow

Moving mails, calendars and contacts from Google Workspace to Mailcow — with IMAP migration, Google Takeout for calendars and contacts.

intermediate ·

Moving from Google Workspace (formerly G Suite) to Mailcow is structured much like the Microsoft 365 migration, but Google has its own quirks — especially around authentication and the label system.

The same applies here: you can use the IMAP migration tool in the mailbox backend for free, self-service. If we handle the complete migration, it’s a flat fee — conditions on the Mailhosting product page. Here’s the process for the assisted variant.

Preparation

What we need from you:

  1. List of mail addresses to migrate.
  2. Google Workspace admin access or per address:
    • App password generated in Google (see below)
  3. Mailboxes already created in Mailcow.

Generating app passwords in Google

  1. In your Google account under myaccount.google.com → Security.
  2. Two-factor authentication must be enabled (required for app passwords).
  3. App passwords (sometimes hidden under “security options”) → create a new token.
  4. Write down the token — Google shows it only once.

One app password per mailbox. With many addresses, a bulk script via the admin console pays off — we help.

Alternative: OAuth access

If your Workspace tenant doesn’t allow app passwords, we register a Google Cloud Workspace API app with mail-read permissions together with you. The migration then runs via OAuth — a bit more setup effort, but no app passwords needed.

Quirk: Google labels instead of folders

Gmail uses labels instead of folders — one mail can have several labels (in “Important” AND in “Newsletter” at the same time). Mailcow / IMAP works with classic folders (one mail in one folder).

During migration:

  • One IMAP folder is created per label.
  • A mail with three labels ends up in three folders (as a copy each).
  • Read/unread status is preserved.

With many different labels, the folder structure in Mailcow gets big. From our experience, cleaning up before the migration pays off: in Gmail under Settings → Labels, delete unused labels. That speeds up the migration and makes the Mailcow mailbox tidier.

We migrate

Open a ticket: “Migration Google Workspace to Mailcow, here are the mailboxes and app passwords”.

We use imapsync with Google-specific options — mainly so that:

  • All Mail (Gmail’s main folder) is not imported twice.
  • Trash and Spam are mapped correctly.
  • Drafts are recognized correctly.

The migration runs in the background per mailbox. From our experience with Google: throttling kicks in faster than with Microsoft. With large mailboxes it can take longer than the data volume would suggest.

What gets copied

  • All mails in inbox, sent, drafts, spam, trash
  • All labels as IMAP folders
  • Read/unread status and stars (as IMAP flags)
  • Original send/receive dates

What does not come over automatically:

  • Filters and rules (in Gmail under Settings → Filters)
  • Out-of-office notices (Gmail’s vacation responder)
  • Aliases and forwardings (Gmail settings)
  • Calendars and contacts — see below

Migrating calendars

Export Google Calendar:

  1. calendar.google.com → Settings → tab Import & export.
  2. Click Export → a ZIP is downloaded.
  3. Unpack the ZIP — one .ics file per calendar.

Import into SOGo:

  1. SOGo webmail → Calendar tab → select a calendar.
  2. Import → ICS file.

Import each calendar separately. SOGo creates a calendar if it doesn’t exist yet — alternatively you can extend existing calendars.

Migrating contacts

Export Google Contacts:

  1. contacts.google.com → Export (menu on the left).
  2. Choose vCard (for iOS contacts).
  3. The file is downloaded.

Import into SOGo:

  1. SOGo webmail → Address books tab → select an address book.
  2. Import → vCard file.

The cutover day — DNS switch

Same as with Microsoft 365:

Day X-1, evening:

  1. We start the final delta sync.
  2. You change the DNS MX records to our mail servers. We give you the values.

Day X: 3. Mails now arrive at Mailcow. 4. We run the final delta sync. 5. End users point their mail clients at Mailcow.

Day X+14: 6. The Google Workspace subscription can be canceled.

Reconfiguring mail clients

Google Workspace was often used with the Gmail app, Outlook with an Exchange setup, or Apple Mail with a Gmail configuration. Per end user:

  1. Remove the old account in the mail app.
  2. Set up the new account as IMAP against Mailcow — see the server details reference.
  3. The initial sync runs, then the mailbox is back.

From our experience: keep using the Gmail app on Android, but as a third-party IMAP account — the familiar workflow stays the same, without cloud routing through Google. See Gmail app for your own mail address.

What can go wrong

Throttling by Google: at IMAP volumes above ~500 MB/h, Google throttles. We lower the sync speed — takes longer then. For very large migrations we spread the work over several nights.

App passwords only work with active 2FA: many Workspace accounts have 2FA enabled, which is good. If not: enabling 2FA is a prerequisite for app passwords.

Chat migration not possible: chats from Hangouts or Google Chat can’t be migrated — Mailhosting is mail, calendar, contacts. If you’re looking for team chat: Nextcloud Talk is included in our Nextcloud Hosting.

Aliases / subdomain setups: If you have complex aliases in Google Workspace (e.g. info@deinverein.devorname@deinverein.de), they have to be recreated in Mailcow — see Aliases and catchall.

Very long mail threads: Gmail’s conversation view shows threads bundled, IMAP folders show individual mails. After the first sync, mails look more scattered — that’s just a different presentation, all mails are there.

Google Takeout for a complete backup

If you also want a full backup of your Google data (not just for migration):

  1. takeout.google.com.
  2. Select: Mail, Calendar, Contacts, possibly Drive, Photos.
  3. Choose the format → ZIP size (max 50 GB per file).
  4. Google prepares the archive (can take 1–7 days for large tenants).
  5. The download link arrives by mail.

Handy as a “backwards compatible” backup, in case you ever want to go back.

Frequently asked questions

How long does a standard migration take (5 mailboxes, 10 GB each)? About a day. Initial migration overnight, small deltas the next morning.

Can we keep working during the migration? Yes. Mails keep arriving at Google; once we switch DNS, at Mailcow.

What if end users had Outlook with an Exchange setup (Office 365 + Google domains)? Some setups use Outlook with an Exchange connector to Google. When switching to Mailcow they have to move to IMAP — we don’t offer Exchange protocols. Calendars and contacts come into Outlook via CalDav Synchronizer.

Are Google Drive files taken along? No, Drive is a separate product. If needed: move to Nextcloud Hosting or storageDRIVE (which many of our customers book alongside Mailcow).

We use Google Tasks — does that come along? Tasks are not migrated directly. You can export them into Google Calendar (they’re included as ICS events) and create tasks in SOGo. Manual effort.

What if my Google Workspace 2FA backup codes are gone? You don’t need them for the migration — an app password is enough. But for the Workspace admin session itself you need some auth method. If lost: go through Google’s account recovery.

Which data stays at Google after the migration? All of it, until you cancel the subscription and Google deletes the Workspace account. We recommend running 30–60 days in parallel — as a safety buffer in case something is missing in Mailcow.

Can we sort out some mails? Before the migration: yes, delete spam/promotions/old emails in Gmail, then migrate clean. After the migration: delete from Mailcow, anytime.

What’s next

Related products
Tags
mailcow migration google-workspace gmail

Did this article help?

If not, open a ticket. If it did, we're happy about a referral — both sides get €25 credit on their customer account.