The JMAP importer-exporter
Migrate whole mail servers or single accounts to Stalwart, with zero downtime or in one shot, from Dovecot, Zimbra, Exchange, Microsoft 365, Google Workspace, any IMAP server and more.
|
|
Vandelay migrates mail systems to Stalwart. It discovers the accounts of the source server, creates them on Stalwart with their domains, aliases, groups, lists, passwords and DKIM keys, copies their mail, folders, Sieve scripts, calendars, contacts and files, keeps the copy current until the cutover, switches users over and verifies the result. The source is only ever read.
Two cutover strategies are available:
- Zero downtime: accounts switch one at a time behind the Stalwart proxy, while the old server keeps serving the rest. Users keep their server name and notice one brief reconnection.
- One shot: every account is copied while users keep working on the old server, then each domain moves at once with an MX change, followed by a final pass.
Every migration can be driven from a web interface, a terminal interface or the command line, and all three work on the same project.
The full documentation is at stalw.art/docs/migration.
| Source | Documentation |
|---|---|
| Dovecot and Postfix | Guide |
| docker-mailserver | Guide |
| iRedMail | Guide |
| mailcow | Guide |
| Mailu | Guide |
| Mail-in-a-Box | Guide |
| Modoboa | Guide |
| Zimbra | Guide |
| Exchange Server | Guide |
| Microsoft 365 | Guide |
| Google Workspace | Guide |
| Any other IMAP server | Guide |
| Stalwart 0.15 and 0.16 | Guide |
The target is Stalwart 1.2 or later.
# macOS / Linux
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/stalwartlabs/vandelay/releases/latest/download/vandelay-installer.sh | sh
# Homebrew
brew install stalwartlabs/tap/vandelay
# Windows
powershell -ExecutionPolicy Bypass -c "irm https://github.com/stalwartlabs/vandelay/releases/latest/download/vandelay-installer.ps1 | iex"
# npm
npm install -g @stalwartlabs/vandelay
# Container
docker run --rm -it --user "$(id -u):$(id -g)" -v "$PWD:/data" ghcr.io/stalwartlabs/vandelay --help
# From source
cargo install --path crates/vandelayA signed .msi is also published with each release. The web interface is not included in the Windows build. See Installation for host requirements.
vandelay serve --root /srv/migrationsOpen the sign-in link it prints, create a project and follow the steps. The interface listens on 127.0.0.1:8090. It is an administrator tool, not a public interface: never expose it to the internet, and reach it from another machine through an SSH tunnel (ssh -L 8090:127.0.0.1:8090 <host>) or a trusted management network.
vandelay tui --root /srv/migrationsPress n to create a project, then follow the steps. ? shows the keys.
vandelay migrate init --project acme --scope server
cd acme
vandelay migrate target --url=https://mail.example.org --user=admin --password=ask
vandelay migrate source --system=dovecot \
--imap-url=imaps://mail-old.example.org --sieve-url=sieve://mail-old.example.org \
--master-user=vandelay --master-password=env:VANDELAY_MASTER \
--host-access=ssh --ssh=root@mail-old.example.org
vandelay migrate discover
vandelay migrate select --all
vandelay migrate options --cutover=domain
vandelay migrate preflight
vandelay migrate runSecrets in a plan are always references (env:NAME, file:PATH or ask), never the secret itself. vandelay migrate guide <name> prints the setup guide of each source, and the web and terminal interfaces show the equivalent CLI command for every form step. See Server migration for the full procedure.
| Command | Purpose |
|---|---|
vandelay serve |
Web interface (not in the Windows build) |
vandelay tui |
Terminal interface |
vandelay migrate <command> |
Whole-server or single-account migration into Stalwart (reference) |
vandelay import <source> |
Read one account into a local archive, from JMAP, IMAP, CalDAV, CardDAV, WebDAV, ManageSieve, Maildir, Google Takeout, Exchange (EWS) or Microsoft Graph |
vandelay export |
Write an archive into one account on a JMAP server |
vandelay inspect |
Show the contents of an archive, read-only |
The per-account import, export and inspect commands work with any JMAP server and serve sources without a connector and account backups. See Import and export.
vandelay <command> --help lists the options of every command.
The test suite (unit, mock and live Docker tests, with their fixtures) lives in a separate repository, vandelay-tests, which must be checked out next to this one (../vandelay-tests). This repository builds and lints on its own:
cargo build
cargo clippy --all-targetsThis project is dual-licensed under the GNU Affero General Public License v3.0 (AGPL-3.0; as published by the Free Software Foundation) OR the Stalwart Enterprise License v2 (SELv2):
- The GNU Affero General Public License v3.0 is a free software license that ensures your freedom to use, modify, and distribute the software, with the condition that any modified versions of the software must also be distributed under the same license.
- The Stalwart Enterprise License v2 (SELv2) is a proprietary license designed for commercial use. It offers additional features and greater flexibility for businesses that do not wish to comply with the AGPL-3.0 license requirements.
Each file in this project contains a license notice at the top, indicating the applicable license(s). The license notice follows the REUSE guidelines to ensure clarity and consistency. The full text of each license is available in the LICENSES directory.
Copyright (C) 2020, Stalwart Labs LLC

