Skip to content

feat(mail): mailaccount write endpoints — add / update / delete - #187

Merged
chmmou merged 1 commit into
mainfrom
feature/mailaccount-write
May 22, 2026
Merged

feat(mail): mailaccount write endpoints — add / update / delete#187
chmmou merged 1 commit into
mainfrom
feature/mailaccount-write

Conversation

@chmmou

@chmmou chmmou commented May 22, 2026

Copy link
Copy Markdown
Owner

Wires `add_mailaccount` / `update_mailaccount` / `delete_mailaccount` through the shared `kaswrite` seam as the next #13 write slice.

  • `add` is reversible (not prompted); `update` and `delete` are gated by the feat(cli): destructive-write confirmation infrastructure (--yes / interactive prompt) #109 confirmation prompt. All three honour `--dry-run` (feat(cli): --dry-run for write commands #132) and emit a feat(cli): structured write-action audit log #131 audit record with the password redacted.
  • `add` splits the address into `local_part`/`domain_part` and takes no `mail_login` (KAS generates it, echoed in `ReturnInfo`). Y/N/text toggles and XLIST folder names default to the KAS API defaults, so a bare `add --password ` is a complete create.
  • Password key splits between actions: `--password` → `mail_password` on add, `mail_new_password` on update. `update` sends only the explicitly-changed flags; `--responder` is passed through verbatim.
  • `delete_mailaccount` uses the louder "permanently delete" verb (drops the mailbox and all messages), shared with `delete_database`.
  • Read fixtures refreshed to real responses; read mapping tests realigned (empty mailbox ⇒ `used_mailaccount_space` 0). Two add fault fixtures with mismatched fault codes were corrected by the maintainer; all fault fixtures are now pinned to their documented codes.

Closes #114

Wire add_mailaccount / update_mailaccount / delete_mailaccount through
the shared kaswrite seam. update and delete are gated by the #109
confirmation prompt; add is reversible and not prompted. All three
honour --dry-run and emit a #131 audit record with the password
redacted.

add splits the address into local_part/domain_part and takes no
mail_login (KAS generates it, echoed in ReturnInfo). The password key
splits between actions: --password maps to mail_password on add and
mail_new_password on update. delete_mailaccount uses the louder
"permanently delete" verb (drops the mailbox and all messages),
shared with delete_database.

Read fixtures were refreshed to real responses; the read mapping tests
were realigned (empty mailbox => used_mailaccount_space 0).

Closes #114
@chmmou
chmmou merged commit 637ec4a into main May 22, 2026
6 checks passed
@chmmou
chmmou deleted the feature/mailaccount-write branch May 22, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mail): mailaccount write endpoints — add / update / delete

1 participant