Skip to content

Troubleshooting

This page lists the problems that occur most often in a migration, grouped by the stage at which they appear. Each entry quotes the message Vandelay or the server prints, explains the cause and gives the fix. Problems specific to one source system are on that system’s source page.

Vandelay records what it does in the project’s logs/ directory: runner.log for the project and one log per account. The “Log level” setting (advanced.log_level) raises the detail of the account logs to protocol calls or full wire bodies while a problem is investigated. On Stalwart, raising the log level to debug shows the details of each connection and delivery. The exit codes of every command are listed in migrate commands.

A test or a copy fails with the server refused the sign-in as <login>: <server text>, or, with the authzid master login format, the server refused the sign-in as <master> for <user>: <server text>. The login is the one Vandelay presented, and the server text is the source’s own reason. Check the password reference, the master user and the “Master login format”, as described in Master user.

A connection fails with the TLS error followed by (the certificate is not trusted; to accept it, set its SHA-256 fingerprint <fingerprint> as the certificate pin). The server presents a self-signed certificate, or one issued by a private authority. Check the fingerprint on the server, then copy it into the pin field of that server: “Source certificate pin (SHA-256)” for the source, “Certificate pin (SHA-256)” for Stalwart, or “Proxy certificate pin (SHA-256)” for the proxy. Certificate pins describes what a source pin covers. Detection never offers a fingerprint, because it keeps strict certificate checks.

Saving the source is refused with Credentials without TLS: <host> has a pinned certificate, and the pin covers every port of that host, so the source must reach it over TLS: use imaps:// and sieves:// source URLs, or choose Never send credentials without TLS. A pin matches the host on every port, so Vandelay never talks to a pinned host without TLS. Use imaps:// and sieves:// URLs, or choose “Never send credentials without TLS”, which upgrades imap:// and sieve:// URLs with STARTTLS.

A detection probe reports the host name could not be resolved (<detail>). The domain, or a host name its records point to, does not resolve from the Vandelay host. Check the name and the resolver of the Vandelay host, or skip detection and type the server details on Source: access.

After choosing a system on Source: detect, the step shows Not saved yet: plan.toml has no source., or, when the plan already names a source, Not saved yet: plan.toml still says <system>., followed by an explanation. Source: detect only keeps the choice for the next step. The system is written to plan.toml, replacing the old one, when its access details are saved on Source: access.

Provisioning and copying start only after a pre-flight that passed against the current plan. Otherwise the request is refused with one of these messages:

pre-flight has not run yet; run `vandelay migrate preflight` first
the plan changed after the last pre-flight; run `vandelay migrate preflight` again
the last pre-flight did not pass; fix what it reports and run `vandelay migrate preflight` again
the accounts were discovered from another source; run `vandelay migrate discover` again

Any change to the plan makes the last pre-flight stale, because pre-flight compares a fingerprint of the whole plan. Run pre-flight again after the change. A blocking result lists its problems in one line, such as pre-flight found 2 blocking problems (target-permissions, disk), and the full report shows the detail of each check.

Pre-flight fails with Stalwart is older than 1.2: upgrade Stalwart, or migrate account by account with vandelay import and vandelay export, which work with any JMAP server. Upgrade the target first; the per-account import and export commands work with older targets but provision nothing.

Pre-flight fails with missing permissions: followed by the permissions the administrator lacks. Vandelay needs the permissions to create domains, accounts, groups, lists and DKIM keys, and, while “Allow vandelay’s address” is on, to manage allowed IP addresses. Sign in with an account that holds the administrator role, or add the listed permissions to its role.

Pre-flight fails with estimated archive size <n> bytes for <n> accounts left to archive, <n> bytes free on the project volume; free space or move the project before archiving. The estimate is the source’s reported size plus overhead, for the accounts that are not archived yet. Free space on the volume, or create the project on a larger one. Leaving Junk and Trash or large folders out of the copy shrinks the estimate, and Finish deletes the archives of completed accounts when that step is ticked.

The “Source access” check signs in as one selected account and lists its folders. It fails with <address>: signed in as the master user (login separator), but no folder was listed when the master user can sign in but cannot see the user’s mailbox. On Dovecot with the ACL plugin, a master login sees no folder unless acl_user is set to the user, as described on the Dovecot and Postfix page. On Exchange, the mailbox must exist and be inside the management scope of the service account’s ApplicationImpersonation role.

The “Address conflicts” check lists every source address that already exists on Stalwart, or that two source accounts share, such as alias [email protected] of [email protected]. Each conflict must be resolved before provisioning: skip or retarget the account with vandelay migrate account-set, or change the conflicting object on Stalwart. A conflict that is only “exists on the target” is resolved by setting “Accounts already in Stalwart” to use the existing account.

Proxy mode refused with a read-only mapping store

Section titled “Proxy mode refused with a read-only mapping store”

Pre-flight fails with the proxy mapping store is read-only: proxy mode needs a writable store (a file, Redis or SQL store without read_only). Vandelay switches an account by writing its mappings through the proxy’s management API. A SQL store is read-only unless both upsert_query and delete_query are set, as described in SQL.

When the write test fails for another reason, the message is the mapping store write test failed: <error>, and the test mapping may remain in the store; the next pre-flight removes it.

Every proxy check fails with proxy admin API locked this address out after failed authentications; check the token and wait out the proxy's lockout_duration (5 minutes by default). The token in the plan is wrong, or the token file changed since. Correct the reference in “Proxy admin token”, wait for the lockout to end, and run vandelay migrate test proxy.

Every connection through the proxy fails after it starts

Section titled “Every connection through the proxy fails after it starts”

Every forwarded connection fails. The proxy log records a backend connection error, often a TLS handshake that ends in a decode error, and the destination’s failure count climbs in the proxy’s web interface.

The proxy starts each connection with a PROXY protocol header, and the server is not expecting one, so it reads the header as the start of the protocol. For Stalwart, check that proxyTrustedNetworks in SystemSettings contains the proxy’s address and that Stalwart was restarted after the change. For a Dovecot and Postfix source, the source’s destination must use forwarding = "xclient".

A host that connects to Stalwart directly receives nothing, or its connection hangs until it times out. The host is inside a network listed in proxyTrustedNetworks, and Stalwart expects every connection from such a network to start with a PROXY header. Stalwart logs a network.timeout event when the client waits for the greeting, and a network.proxy-error event when the client sends data first. Run tools from a host outside the trusted networks, or through the proxy.

The entries in this group are confirmed in two logs. Stalwart’s log shows the reply to each recipient and, for relayed messages, the attempts through the source route with the source’s reply. The source’s mail log shows whether it accepted the relay.

Mail for an account on the source rejected with “Mailbox does not exist”

Section titled “Mail for an account on the source rejected with “Mailbox does not exist””

Stalwart rejects a message for an account that has not switched yet with 550 5.1.1 Mailbox does not exist.. Vandelay creates the domains without relaying for unknown recipients, so Stalwart rejects every recipient that has no account. Enable allowRelaying on the domain, as described in Split delivery.

Mail for accounts on the source in a catch-all mailbox

Section titled “Mail for accounts on the source in a catch-all mailbox”

Mail for accounts that have not switched is delivered on Stalwart, all to one mailbox, and never reaches the source. The domain has a catch-all address on Stalwart, which takes precedence over relaying. Remove it: Vandelay sets catch-all addresses at Finish, after the last switch.

The source refuses mail relayed from Stalwart. A Postfix source with reject_non_fqdn_helo_hostname rejects Stalwart’s greeting when Stalwart uses an internal host name, and SPF, DMARC, greylisting or spam checks reject the message because Stalwart is not an authorised sender for the domain. Exempt Stalwart’s address from these checks on the source, as described in Dovecot and Postfix.

Calendar or contact clients receive “404 Not Found”

Section titled “Calendar or contact clients receive “404 Not Found””

A CalDAV or CardDAV client of a switched account receives 404 Not Found. Its collection URL contains a bare account name, such as /dav/cal/alice/, which Stalwart does not resolve. Change the URL to the address form, /dav/cal/alice%40example.org/, or set the client up again from the server name. On mailcow, clients configured with a SOGo collection URL, such as /SOGo/dav/[email protected]/Calendar/personal/, are reconfigured in the same way.

The proxy routes by the exact login the client presents, after the normalisation of the mapping store. Vandelay maps the address, the bare user name where the source accepts one, and every alias of the account. A login form outside these, such as an old address that is no longer an alias, still goes to the source. GET /api/v1/mappings/lookup?identifier=<login> on the proxy’s management API shows where a login resolves and whether the result is cached. The per-account override login_forms adds forms for the next switch.

A JMAP client of a switched account follows the URLs that Stalwart advertises in its session. When Stalwart advertises its own address instead of the public server name, the client’s requests bypass the proxy. Set STALWART_PUBLIC_URL to the public server name, as described in Public URL, and restart Stalwart.

Changes made on the source after the switch missing

Section titled “Changes made on the source after the switch missing”

Messages that reach the source after an account’s switch, such as mail from an account still on the source, are copied by catch-up passes, which only create items. Flag changes and deletions made on the source after the final copy do not follow, and a message deleted permanently on Stalwart reappears when a catch-up copies it again. Keep the catch-up passes running until no more mail reaches the source for the account, then close it with Complete.

A command fails with this project's runner is vandelay <version> (protocol <n>); use that version, or stop it and retry. A TUI, web interface or detached runner of another Vandelay version holds the project. Use the same version, or stop that runner with vandelay migrate stop from that version.

A change to the target, the source, the proxy or the cutover mode is refused with the target cannot change after the migration has started: this project uses <identity>; restore it, or create a new project for another server. These parts are bound when work starts, as Concepts explains. Restore the previous value, or create a new project.

Edits are refused with plan.toml changed on disk; reload or discard the change before editing the plan, and the runner starts no new tasks. Apply the hand edit with vandelay migrate plan reload, or throw it away with vandelay migrate plan discard.

A task fails with secret env:<name> is not set, or, for an ask reference in an unattended run, with <label> (<key>) is needed: set it to an env: or file: reference before running unattended, or run on a TTY to be asked. The runner reads env: references from its own environment, so the variable must be set where the runner starts, which for the web and terminal interfaces is the shell that started them. Unattended runs use env: or file: references, or answer the prompt from an attached TUI or web interface.

A command fails with no secret store passphrase: pass --key-file, set $VANDELAY_SECRETS_PASSPHRASE, or run on a TTY. The project’s secret store needs its passphrase or key file to open. A web or terminal interface whose runner is locked is unlocked from the host with vandelay migrate secrets unlock.

Settings can no longer be saved, and the project shows The migration is finished, so this project is read-only: its settings can no longer be saved and detection does not run. Verify and report and the downloads stay available. Finish ran successfully after the last account transition, with no account still open, so the project is finished and its runner has stopped. The report and the downloads stay available on Verify and report. The CLI, and an action or a save in the TUI or the web UI, report the same state with Migration finished: this project is read-only.; inspect, report and export-users still work, as described in migrate commands.

A command ends with the runner was stopped with work left; run again to continue and exit code 8. The runner was stopped, with Ctrl-C or vandelay migrate stop, while tasks were waiting. Every copy is convergent, so running the same command again continues where it stopped.

Account fails because its mail would be read another way

Section titled “Account fails because its mail would be read another way”

An account fails with this account's mail would now be read through <kind> but its archive was made through <other>. The source setting that decides how the account’s mail is read changed after the account was first archived; on Zimbra, for example, the account’s status or its IMAP access. Put the source back as it was and retry, or, before the switch, re-run the account from scratch, which archives it again.

Writes to Stalwart fail with limit.too-many-requests events in Stalwart’s log, or every connection from the Vandelay host is refused. Vandelay signs in with an account that lacks the unlimitedRequests permission and runs without its allowed-IP entry, so the authenticated rate limit and automatic banning apply to it. Use the default administrator, keep “Allow vandelay’s address” on, or raise the limits listed in Planning.

The address given to --url is only where Vandelay fetches the JMAP session. After fetching it, Vandelay sends its requests to the API, upload and download URLs that the session advertises, as JMAP requires of a client.

Some servers serve their API and their blobs from different hosts, so an advertised URL with an origin (scheme, host and port) other than that of --url is not an error. Vandelay prints a warning such as the following, and continues with the advertised URL:

warning: session advertises apiUrl, uploadUrl, downloadUrl on https://mail.example.org (connected to https://mail.example.org:10443); vandelay must use the advertised URL. If this is wrong, fix the server's advertised HTTP URL setting.

The usual cause of this warning is a server that is reachable on a port other than 443 but advertises URLs without that port. Requests then reach whatever else listens on port 443, and fail, often with 404 Not Found. Vandelay stops with exit code 2 at the first data type.

The fix is on the server: its public URL must be the full address that clients use, including the port. On Stalwart, the public URL is set with the STALWART_PUBLIC_URL environment variable.