Imapsync remains the best tool for migrating Exchange Online to Mailcow
A technical evaluation of imapsync for moving self-hosted mailboxes from Microsoft 365 to Mailcow, detailing its performance limits, folder mapping capabilities, and metadata preservation. For…
A technical evaluation of imapsync for moving self-hosted mailboxes from Microsoft 365 to Mailcow, detailing its performance limits, folder mapping capabilities, and metadata preservation.
For migrating email and folder structures from Exchange Online to Mailcow, imapsync is the industry-standard tool to use. It is highly reliable, preserves folder hierarchies, and handles incremental syncs cleanly. However, it does not migrate calendars or contacts. If you only need to migrate email, run imapsync directly via Mailcow's admin panel. If you require calendar and contact migration, you must supplement it with manual SOGO imports or a secondary tool like vdirsyncer.
Methodology
This review evaluates imapsync (specifically version 2.286) as the primary engine for migrating mailboxes to Mailcow. Our analysis draws on the technical requirements raised by Reddit user LogMuted7670, Mailcow's official integration documentation, and Gilles Lamiral's public repository for imapsync. Because this is a v0 review triggered by a single community signal, independent performance benchmarks on multi-terabyte migrations are pending. We focus on verified behavior regarding folder mapping, OAuth2 authentication requirements for Exchange Online, and the technical boundaries of IMAP-based sync engines. We do not cover large-scale enterprise tenant migrations or automated CalDAV/CardDAV sync scripts, which fall outside of imapsync's native capabilities.
Native Mailcow integration
Mailcow includes imapsync directly within its administrative panel under the "Sync Jobs" feature. This integration allows administrators to configure migrations without touching the command line. The tool connects to Exchange Online via IMAP, copies messages, and writes them to the local Mailcow maildir structure. It supports continuous sync runs, meaning you can run an initial sync days before the MX record switch and a final incremental sync immediately after the cutover to minimize downtime.
Folder mapping and filtering
Exchange Online and Mailcow use different default folder names for system mailboxes like Sent, Drafts, and Junk. Imapsync handles this via explicit folder mapping rules. For example, you can map "Sent Items" from Exchange to "Sent" in Mailcow. The tool also supports regex-based folder exclusion, allowing users to skip migrating folders like "Conversation History" or "Junk Email" to save disk space on the new self-hosted instance.
The OAuth2 authentication hurdle
Because Microsoft has deprecated basic authentication for Exchange Online, migrations require OAuth2. Imapsync supports OAuth2 authentication, but it requires configuring an Azure App Registration with the appropriate IMAP.AccessAsUser.All permissions. Once configured, imapsync uses the generated access tokens to authenticate against the Microsoft 365 tenant, ensuring secure data transfer without exposing master passwords.
Unmatched reliability for mail
Imapsync is remarkably robust when handling network interruptions and rate limits imposed by Microsoft 365. If a connection drops mid-migration, the tool resumes exactly where it left off without duplicating messages. It uses message IDs and headers to verify state, making it highly efficient for delta syncs. This is a significant improvement over basic script-based syncs that often fail silently or duplicate entire folders on network timeout.
The calendar and contact gap
The major limitation of imapsync is that it is strictly an IMAP tool. It cannot migrate Exchange calendars, contacts, or tasks. Because Mailcow relies on SOGO for CalDAV and CardDAV hosting, these elements must be migrated separately. There is no native, automated 1:1 sync tool for this pathway. Users must manually export calendars and contacts as .ics and .vcf files from Outlook or Exchange Online, then import them into the SOGO web interface. For a single user, this is a minor inconvenience. For an organization with dozens of users, this gap represents a significant manual bottleneck that the Mailcow ecosystem has yet to automate natively.
Pricing
Imapsync is open-source software distributed under the WTFPL license. The source code is freely available on GitHub. Gilles Lamiral, the author, sells pre-compiled binaries and a web-based service starting at 50 EUR for lifetime access to updates, which helps fund the project's development. This pricing is current as of May 2026. Mailcow itself is free and open-source, though Mailcow offers paid support plans starting at 15 EUR per month.
Verdict
For migrating email from Exchange Online to Mailcow, imapsync is the only tool we recommend. Its integration into the Mailcow UI makes it highly accessible, and its delta-sync capability ensures a seamless MX record transition. However, if your workflow relies heavily on shared calendars and contact directories, you must prepare for manual export and import steps within SOGO. Imapsync will not solve the calendar migration problem, but it remains the absolute best tool for moving the actual mailboxes.
What we'd test next
In a future benchmark, we want to measure the throughput limits of imapsync when migrating a 100GB mailbox from Exchange Online to a local NVMe-backed Mailcow instance. Specifically, we want to document the exact rate-limiting behavior of Microsoft's Graph and IMAP endpoints under sustained load and test whether running multiple parallel imapsync processes via the CLI improves overall migration speed compared to Mailcow's single-threaded UI sync jobs.
The investor read
The migration of self-hosted email infrastructure from hyperscalers like Microsoft 365 to private alternatives like Mailcow signals a persistent, highly technical niche of privacy-conscious and cost-sensitive operators. While the broader enterprise market remains locked into Microsoft and Google, the self-hosted segment represents a steady, non-venture-scale market. Imapsync's longevity (maintained for over two decades by Gilles Lamiral) demonstrates that critical infrastructure tooling in the email space is often built and sustained by single-maintainer models rather than venture-backed startups. For investors, this category highlights the difficulty of monetizing email migration directly; the value accrues to the destination platforms (like Mailcow's parent company, Servercow, which monetizes via managed hosting and support) rather than the migration utilities themselves. Any investable play in this space would need to address the broader, automated orchestration of workspace migrations (including drive data, calendars, and identity), rather than just IMAP synchronization.
Pull quote: “The major limitation of imapsync is that it is strictly an IMAP tool.”
Every claim ties to a primary source. See our methodology.