Vandelay - Multiple Import Sources

Your question

I originally ran Vandelay import against an Exchange mailbox, and then exported it into Stalwart 0.16.

As there were Calendar import/export issues at the time, I left my Calendar operating on Exchange. Stalwart 0.16 of course has received all the mail since.

If I wished to start up a clean Stalwart 1.0.x, can I run a clean import from EWS first, then run the same archive with an import against 0.16, and expect they would concatenate appropriately?

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Source-change protection matters here; let me read it.

Vandelay’s docs don’t say what happens when an EWS import and a JMAP import share one archive, so I can’t promise they’ll concatenate cleanly. The separate-archive approach at the end avoids that uncertainty.

What the docs do say. Source-change protection only refuses a second import of the same kind from a different source. An EWS import and a JMAP import into one archive don’t conflict, because sources of different kinds are allowed. The docs give IMAP plus CalDAV into one archive as an example.

Where the risk is. Every import reconciles against its own source. It adds new objects, refreshes changed ones, and removes archive objects that have disappeared from the source. The docs don’t say whether that removal is limited to objects that source originally supplied. If it isn’t, a repeated EWS run could prune the mail that came from the 0.16 JMAP import, because that mail isn’t in Exchange any more. The docs also don’t say how overlapping content would be de-duplicated. Your mail would overlap, since the EWS import has the old mail and 0.16 has the same old mail plus the new mail.

A safer way to split it. The JMAP importer takes --objects, so you can pull only what you need from 0.16. The 0.16 JMAP source is also documented to skip files and exit with code 5, so you’d want to exclude filenode anyway.

vandelay import jmap \
  --url https://old-mail.example.com \
  --auth-basic [email protected] \
  --account-name [email protected] \
  --objects mailbox,email,identity,sievescript \
  alice.sqlite

The EWS importer has no documented --objects option, so you can’t limit it to calendars and contacts. For the EWS import I’d either:

  • Use separate archives. Run EWS into alice-ews.sqlite and JMAP into alice-jmap.sqlite, then export each to the 1.0 target in turn. The export writes to a JMAP server and matches existing objects by rules described here, so check them first, and run --dry-run for both imports and exports.
  • Or run the EWS import first and the JMAP import with --objects after it, using --dry-run to see what the second run would remove or add before committing.

Take a copy of the archive file before any combined run so you can roll back.

Docs: Import overview, JMAP importer, Exchange EWS importer.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.