# Migrate IMAP mailboxes to grommunio with imapsync

Source: https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step
Language: en
Published: 2026-09-15
Updated: 2026-11-17

Tested step-by-step guide: migrate IMAP mailboxes to grommunio with imapsync, including initial sync, delta sync, resume and web validation.

Part 12 of the grommunio 2026 series shows a generic IMAP migration to grommunio with imapsync. The lab covered inventory, target preparation, initial sync, delta sync, resume, bulk migration and web validation.

## Overview

- Source: isolated Dovecot IMAP server with realistic test mailboxes.
- Target: grommunio Appliance 2026.06.1 with gromox 3.10.123.
- Tooling: imapsync 2.229 from the grommunio appliance packages.
- Result: initial sync, delta sync, idempotency, resume, bulk and web validation passed.

## What IMAP Migrates And What It Does Not

IMAP migrates mailbox contents, folders, typical message flags, internal dates and attachments. IMAP does not automatically migrate calendars, contacts, tasks, server-side rules, Sieve rules, delegations, shared mailbox permissions, public folders, GAL data, identities, passwords or mobile device profiles.

## Tested Environment

- grommunio-release 2026.06.1
- gromox 3.10.123
- grommunio-imapsync 2.229
- imapsync 2.229
- Source IMAP via isolated Dovecot lab server

## Source Baseline

```json
{
  "source": "alice@example.test",
  "state": "before initial sync",
  "totalMessages": 12,
  "folders": {
    "INBOX": {
      "messages": 6,
      "unread": 4,
      "flagged": 1,
      "sampleFlags": [
        "\\Recent",
        "\\Seen \\Recent",
        "\\Flagged \\Recent"
      ]
    },
    "Drafts": {
      "messages": 1,
      "sampleFlags": [
        "\\Draft \\Recent"
      ]
    },
    "Sent": {
      "messages": 1,
      "sampleFlags": [
        "\\Seen \\Recent"
      ]
    },
    "Trash": {
      "messages": 1,
      "sampleFlags": [
        "\\Seen \\Recent"
      ]
    },
    "Junk": {
      "messages": 1,
      "sampleFlags": [
        "\\Recent"
      ]
    },
    "Projects": {
      "messages": 1,
      "sampleFlags": [
        "\\Recent"
      ]
    },
    "Projects/2024": {
      "messages": 1,
      "sampleFlags": [
        "\\Answered \\Recent"
      ]
    },
    "Archive": {
      "messages": 0
    }
  },
  "attachments": [
    "migration-proof.txt",
    "larger-attachment.bin"
  ]
}
```

## Prepare The grommunio Target

Before syncing, the domain, users, mailboxes, passwords, IMAP privileges and web access were prepared. imapsync does not create the full grommunio identity structure.

```json
{
  "target": "alice@example.test",
  "state": "before initial sync",
  "totalMessages": 0,
  "folders": {
    "INBOX": 0,
    "Drafts": 0,
    "Sent Items": 0,
    "Deleted Items": 0,
    "Junk Email": 0
  }
}
```

## Initial Sync

```bash
imapsync --host1 source.example.test --port1 993 --ssl1 --user1 alice@example.test --passfile1 /root/imapsync-lab/secrets/alice-source.pass --host2 mail.example.test --port2 993 --ssl2 --user2 alice@example.test --passfile2 /root/imapsync-lab/secrets/alice-target.pass --automap --subscribe
```

```bash
Initial sync: PASS
Host1 -> Host2: source IMAP -> grommunio IMAP
Messages transferred : 12
Messages skipped     : 0
Detected errors      : 0
Return value         : 0 (EX_OK)
Folder mapping       : Sent -> Sent Items, Trash -> Deleted Items, Junk -> Junk Email
```

## Delta Sync And Idempotency

The second imapsync run added only the delta data and did not duplicate existing mail.

```json
{
  "deltaSync": "PASS",
  "transferred": 3,
  "skipped": 12,
  "errors": 0,
  "targetAfterDelta": {
    "totalMessages": 15,
    "flagged": 3,
    "folders": {
      "INBOX": {
        "messages": 8,
        "flagged": 2,
        "sampleFlags": [
          "\\Flagged",
          "\\Seen",
          ""
        ]
      },
      "Delta/NewFolder": {
        "messages": 1,
        "flagged": 1,
        "sampleFlags": [
          "\\Flagged"
        ]
      },
      "Drafts": {
        "messages": 1,
        "sampleFlags": [
          "\\Draft"
        ]
      },
      "Projects/2024": {
        "messages": 1,
        "sampleFlags": [
          "\\Answered"
        ]
      }
    }
  }
}
```

[![grommunio Web showing the migrated delta email after the second imapsync run.](https://forgeone.solutions/media/04-grommunio-web-delta-search.png)](https://forgeone.solutions/media/04-grommunio-web-delta-search.png)

## Attachment And Web Validation

[![grommunio Web showing a migrated message with an attachment.](https://forgeone.solutions/media/05-grommunio-web-attachment-message.png)](https://forgeone.solutions/media/05-grommunio-web-attachment-message.png)

## Resume, Bulk And Negative Test

```bash
Resume test: PASS
Interrupted first run: intentionally stopped
Rerun transferred    : 179
Rerun skipped        : 3
Final target count   : 182/182 messages
Detected errors      : 0
Return value         : 0 (EX_OK)
```

```bash
Negative test: PASS
Scenario     : wrong source password
Result       : source login rejected
IMAP response: NO [AUTHENTICATIONFAILED] Authentication failed
Return value : 161 (EXIT_AUTHENTICATION_FAILURE_USER1)
```

## Cutover Model

- Run the initial sync before the cutover window.
- Test target users and grommunio Web.
- Switch mail flow separately; MX is not imapsync.
- Freeze or control source access.
- Run the final delta sync.
- Validate grommunio Web and clients.

## Result Check / Technical Acceptance

| Area | Check | Expected result | Status |
| --- | --- | --- | --- |
| Tooling | Check grommunio-imapsync and imapsync | imapsync is usable on the appliance | PASS |
| Initial sync | Synchronize pilot mailbox | Folders, mail, flags, dates and attachments exist on target | PASS |
| Delta sync | Sync new source mail and flag changes | Only delta is added, no duplicates | PASS |
| Resume | Repeat interrupted run | Rerun completes mailbox | PASS |
| Bulk | Synchronize multiple users | Additional mailboxes migrate successfully | PASS |
| Web | Check grommunio Web | Migrated mail, folders and attachments are visible | PASS |

## Conclusion

Generic IMAP migration to grommunio is reproducible with imapsync when target users are prepared, password files are used, folder mapping is validated and the delta/cutover model is planned explicitly.

## Hero image

[![grommunio Web showing the migrated delta email after the second imapsync run.](https://forgeone.solutions/media/04-grommunio-web-delta-search.png)](https://forgeone.solutions/media/04-grommunio-web-delta-search.png)

## Author

Mathias Rumbold

## Category

- [grommunio & Groupware](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?category=grommunio-groupware)

## Tags

- [grommunio](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?tags=grommunio)
- [Keycloak](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?tags=keycloak)
- [SSO](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?tags=sso)
- [MFA](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?tags=mfa)
- [Enterprise Linux](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?tags=enterprise-linux)
- [Upgrade](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step?tags=upgrade)

## Plan a grommunio migration

ForgeOne supports grommunio migrations, target architecture, test runs, cutover planning and operations.

[Discuss a grommunio project](https://forgeone.solutions/en/contact)

## grommunio 2026 Schritt für Schritt

Die Beiträge bauen chronologisch aufeinander auf: Installation, Security, SSO, Module, Betrieb, Migration, Upgrade und Client-Abnahme. Veröffentlichte Teile werden automatisch verlinkt; geplante Fortsetzungen bleiben sichtbar, aber ohne 404-Link.

1. [Install grommunio 2026.06.1: From ISO to Working Groupware](https://forgeone.solutions/en/tech/install-grommunio-2026)
2. [grommunio-antispam with Rspamd: Spam Filtering, Learning and Operations Step by Step](https://forgeone.solutions/en/tech/grommunio-antispam-rspamd-2026-step-by-step)
3. [grommunio-auth with Keycloak: SSO and central login step by step](https://forgeone.solutions/en/tech/grommunio-auth-keycloak-2026-step-by-step)
4. [Set up grommunio Meet 2026 without Keycloak and optionally add SSO](https://forgeone.solutions/en/tech/grommunio-meet-2026-step-by-step)
5. [Set Up grommunio Chat 2026: Teams, Channels, Users and Multi-Tenancy Testing](https://forgeone.solutions/en/tech/grommunio-chat-2026-step-by-step)
6. [Set Up grommunio Files and Office: Validate Files, Web Entry and Online Office](https://forgeone.solutions/en/tech/grommunio-files-office-2026-step-by-step)
7. [Set Up grommunio Archive 2026: Archive, Search and Restore Email](https://forgeone.solutions/en/tech/grommunio-archive-2026-step-by-step)
8. [grommunio MDM 2026 step by step: manage ActiveSync devices safely](https://forgeone.solutions/en/tech/grommunio-mdm-2026-step-by-step)
9. [grommunio Multitenancy 2026: organizations, domains and multiple LDAP sources](https://forgeone.solutions/en/tech/grommunio-multitenancy-2026-step-by-step)
10. [grommunio 2026 Cluster and High Availability: from multi-server lab to tested active/standby homeserver](https://forgeone.solutions/en/tech/grommunio-cluster-ha-2026-step-by-step)
11. [grommunio 2026 disaster recovery and single mailbox restore: backup, full DR and targeted mailbox recovery in the lab](https://forgeone.solutions/en/tech/grommunio-disaster-recovery-single-mailbox-restore-2026-step-by-step)
12. [Migrate IMAP mailboxes to grommunio with imapsync (current part)](https://forgeone.solutions/en/tech/grommunio-imap-migration-imapsync-2026-step-by-step)
13. [grommunio: Replace Public Folders with a functional mailbox - step by step](https://forgeone.solutions/en/tech/grommunio-public-folder-functional-mailbox-multiple-domains)
14. [grommunio Web 5.0 in the lab: settings namespace, shared mailboxes and admin impact](https://forgeone.solutions/en/tech/grommunio-web-5-0-in-the-lab)
15. [grommunio 2026.06.2 Upgrade and Technical Acceptance: Keycloak SSO, MFA, AutoDiscover and Mail Flow](https://forgeone.solutions/en/tech/grommunio-2026-06-2-upgrade-keycloak-sso-practice)
16. [grommunio native clients after Keycloak SSO: Thunderbird, Outlook, EWS, EAS and MFA explained](https://forgeone.solutions/en/tech/grommunio-native-clients-after-keycloak-sso)
17. grommunio Monitoring und Alerting im Betrieb
18. grommunio Security Hardening in der Praxis
19. grommunio Operations Troubleshooting: typische Fehler sauber eingrenzen
