Migration from postgres to foundationdb in 0.16

Issue Description

After migrating from a postgres data store to a foundationdb data store I’m getting some errors.

Expected Behavior

No errors or warnings when starting Stalwart after the migration is done.

Actual Behavior

I’m getting the following error messages when starting stalwart.

stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067344640765952, reason = “An lookup store with the stwt_openphish namespace already exists”
stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067344808538624, reason = “An lookup store with the stwt_phishtank namespace already exists”
stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067344974214144, reason = “An lookup store with the stwt_disposable_domains namespace already exists”
stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067345144083968, reason = “An lookup store with the stwt_free_domains namespace already exists”

Reproduction Steps

  1. Use the stalwart --config /etc/stalwart/config.json --export command to make a dump of the postgres datastore
  1. Reconfigure (in config.json) to use foundationdb a data store
  2. Use the stalwart --config /etc/stalwart/config.json --import command to import the data into foundationdb
  3. Start stalwart

Relevant Log Output

stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067344640765952, reason = “An lookup store with the stwt_openphish namespace already exists”
stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067344808538624, reason = “An lookup store with the stwt_phishtank namespace already exists”
stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067344974214144, reason = “An lookup store with the stwt_disposable_domains namespace already exists”
stalwart-node-2 | 2026-07-24T14:03:54Z ERROR Configuration build error (registry.build-error) source = “HttpLookup”, id = 320067345144083968, reason = “An lookup store with the stwt_free_domains namespace already exists”

Stalwart Version

v0.16.x

Installation Method

Docker

Database Backend

FoundationDB

Blob Storage

S3-compatible

Search Engine

Internal

Directory Backend

Internal

I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

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

Fixed in v0.16.15 (yet to be released). The fix consists of aborting an import if the store already contains data.