Adding an alias to an account should create a corresponding identity

Issue Description

When adding creating a new account with an alias, the alias is automatically added to the account’s identities; but when adding a new alias to a pre-existing account, the account’s identities aren’t updated.

Expected Behavior

Adding a new alias to an existing account creates a matching new identity.

Actual Behavior

Adding an alias to an account does not create a matching identity. I have to add it myself by JMAP or Bulwark.

Reproduction Steps

  1. Create and save a user.
  2. Inspect identities.
  3. Add an alias to the same user.
  4. Inspect identities. The alias has not been added.

Stalwart Version

v0.16.x

Installation Method

Binary (Linux)

Database Backend

RocksDB

Blob Storage

Filesystem

Search Engine

Elasticsearch

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

That matches how it works today, identities are provisioned lazily and only once, from the account’s full address set the first time identities are accessed. After that there’s no reconciliation that adds an identity when you add an alias later, so for an existing account you do have to add it yourself over JMAP (Identity/set) or via Bulwark, which is what you found.

Yeah, I realize that is the intended behavior as written. I just find it confusingly inconsistent. Because the creation-time alias generated an identity, I expected a later addition to also create one, and wondered what was “wrong.”

This is squarely in the category of small quality-of-life improvement, but little behavioral inconsistencies round up to time wasted wondering why.