Issue Description
When an Account’s name (username/local-part) or domainId is changed via stalwart-cli update Account --field name=… (or via Admin UI equivalent), the computed emailAddress on the Account object updates correctly — but the corresponding JMAP Identity object is not updated and silently keeps the old email address. The Identity object’s state field also does not change, indicating it is not touched at all by the rename operation.
This causes outgoing mail sent via JMAP submission (e.g. from Bulwark webmail) to use the stale, pre-rename address in the From header, with no error surfaced to the user — the message appears to send successfully in the client.
Expected Behavior
Either:
The Identity object’s email should be kept in sync automatically when the underlying Account’s computed emailAddress changes, or
If this is intentional (e.g. treating Identity as an independent, user-managed object per JMAP spec), this should be clearly documented, since the practical effect is that renamed/migrated accounts silently send mail from a stale address with no error surfaced anywhere (not in Bulwark UI, not in server logs at INFO level as far as I could tell).
Actual Behavior
Identity.email and Identity.state remain frozen at their pre-rename values indefinitely, until manually fixed via a Identity/set destroy+create call.
Reproduction Steps
1)Create or use an existing account, e.g. daria@example (short id bg)
2)Confirm an Identity already exists for it:
curl -u “daria@example:PASSWORD” -X POST https://HOST/jmap
-H “Content-Type: application/json”
-d ‘{“using”:[“urn:ietf:params:jmap:core”,“urn:ietf:params:jmap:submission”],“methodCalls”:[[“Identity/get”,{“accountId”:“bg”},“0”]]}’
→ returns email: “daria@example”
3) Rename the account’s username via CLI:
stalwart-cli --url http://localhost:8080 --user admin@… --password … -k
update Account bg --field name=daria-test
4) Confirm the Account itself is correctly renamed:
stalwart-cli … get Account bg
→ Email Address: daria-test@example (correct) 5. Repeat the Identity/get call from step 2 (now authenticating as daria-test@example) → still returns email: “daria@example” (stale), and state is unchanged from step 2
Relevant Log Output
No error appears in logs — the bug is precisely that the stale Identity produces no error anywhere (server logs at default verbosity, Bulwark UI, or client response). Confirmed via direct JMAP calls, not through Bulwark.
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
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