fix(aliases): use Stalwart live wire key enable, not enabled

Merged
UR
3d ago
+27-23

Live Stalwart v1.0.1 rejects x:Account/set alias entries with enabled ("Invalid key for object") and accepts enable (verified live 26 Nov 2026 smoke test). The Stalwart docs still say enabled, so the original code followed the docs and every alias create failed with 502 mail_server_error.

  • EmailAlias.enabled (Rust field unchanged) now serializes as enable via #[serde(rename = "enable")], and set_account_aliases sends "enable" in the patch.
  • All wire-payload fixtures/fakes in crates/mail and apps/api tests now use enable.
  • Untouched on purpose: the IRIS API response field enabled (web client contract), the mail_aliases.enabled DB column, and catch-all (separate endpoint, already PASS live).

Local verification: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --all-targets (318 passed, 0 failed). Web unchanged.

Summary by CodeRabbit

  • Bug Fixes
    • Alias enablement status is now handled consistently when alias settings are exchanged with the mail server. Explicit enabled or disabled states are preserved, and aliases without an explicit status continue to default to enabled. This keeps the displayed and saved status aligned with the mail server’s expected format.