Skip to content

Troubleshooting

This page lists the problems that are specific to a Stalwart source. Problems shared with every zero-downtime migration, such as connections through the proxy that fail, mail rejected by split delivery or calendar clients that receive 404 Not Found after a switch, are described in Troubleshooting.

The new deployment connects to the source to relay a message, and the delivery hangs after the connection until it times out, because the source never sends its greeting.

The source’s port 25 listener expects a PROXY header, which the new deployment does not send. On a Stalwart source, port 25 must be the one listener without trusted networks, as described in Accepting the proxy on every listener except port 25. Check that the smtp listener has no per-listener value, and that no server-wide list applies to it (server.proxy.trusted-networks on Stalwart 0.15, proxyTrustedNetworks in SystemSettings on Stalwart 0.16). Then restart the source.

Relay rejected with “Invalid EHLO domain”

Section titled “Relay rejected with “Invalid EHLO domain””

The source rejects the relay with 550 5.5.0 Invalid EHLO domain.

The new deployment greets with its own host name, which is often an internal name, and the source refuses names that are not fully qualified. On a Stalwart 0.15 source, set session.ehlo.reject-non-fqdn to false. On a Stalwart 0.16 source, set the rejectNonFqdn expression of MtaStageEhlo to false, with an empty match, as described in Trusting mail relayed from the new deployment.

Relayed mail rejected or classified as spam by the source

Section titled “Relayed mail rejected or classified as spam by the source”

The source evaluates SPF, DKIM, DMARC, ARC or reverse DNS for relayed mail. It sees the new deployment as the sending host, and the checks fail.

Disable the inbound checks as described in Trusting mail relayed from the new deployment. On Stalwart 0.16, a check that still applies on port 25 after the change was updated without an empty match.

Administrative tool reaches the wrong server

Section titled “Administrative tool reaches the wrong server”

For a Stalwart source, Vandelay runs through the proxy as the administrator, and is routed by the administrator’s mapping entry. That entry points at the source while reading and at the new deployment while writing, as described in Prepare the tools. A tool that works on the wrong server finds the entry pointing at the other one. GET /api/v1/mappings/lookup?identifier=admin on the proxy’s management API shows its current value.

HTTP clients of moved accounts still reach the source

Section titled “HTTP clients of moved accounts still reach the source”

A JMAP client of a moved account keeps seeing the account’s state on the source.

The client authenticates with an OAuth access token issued by the Stalwart 0.15 source. Such tokens do not contain the account name, so the proxy cannot route the requests, and sends them to the fallback destination, the source. Signing in again does not help while the source is the fallback destination, because the client discovers the source’s authorisation server and obtains a new token from the source.

Until the fallback destination is the new deployment, users of moved accounts sign in from such clients with an app password created on the new deployment. The proxy routes a password login by the account, to the account’s destination.

An account just created on the new deployment refuses its password.

The new deployment cached the absence of the account before it was created, and the cache entry has not expired. Run the InvalidateNegativeCaches action after creating accounts, as described in Create the account on the new deployment, then sign in once against the new deployment’s internal address. If the login still fails, the stored password is wrong, and the account plan is checked against the source.

A JMAP import from a Stalwart 0.15 or 0.16 source copies mail, contacts and calendars but no files, and ends with exit code 5. The warning differs by release:

  • A Stalwart 0.15 source makes the import print warning: file nodes aborted: <error>; continuing, the run will exit 5.
  • A Stalwart 0.16 source makes it print warning: file node <id> skipped: <error> for every file.

Both releases implement earlier drafts of the JMAP file storage specification, which Vandelay does not follow. Leave files out of the JMAP import with --objects, and read them with vandelay import webdav into the same archive, as described in Make the initial copy.

Writing files back to a Stalwart 0.15 source fails

Section titled “Writing files back to a Stalwart 0.15 source fails”

When an account is rolled back to a Stalwart 0.15 source, writing files fails with an error about an invalid property. Mail, mailboxes, Sieve scripts, contacts and calendars are written back without this problem.

Stalwart 0.15 does not accept the files that Vandelay writes over JMAP. Copy the files created on the new deployment after the switch back to the source by hand, over WebDAV.

A setting changed on a Stalwart 0.15 or 0.16 source does not take effect after a reload.

Some settings are applied only when the process restarts: the listener settings, including the trusted networks of the PROXY protocol, and on Stalwart 0.16 the environment variables. Other settings apply on a reload, as described in Reload versus restart. Restart the source through its service manager.