identity-email-notifications: execution plan, application design en units

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 17:58:54 +01:00
co-authored by Claude Sonnet 5.5
parent 10032f5096
commit 1a2fb56e1e
6 changed files with 224 additions and 6 deletions
@@ -85,6 +85,14 @@ B (role checks only) is fine for admin-triggered mails. The anonymous `forgot-pa
### P5 - Mail status persistence (answer to Q7)
"Mail opnieuw versturen" needs to know which mails failed. Proposed v1: show the result in the response of the action and always offer the resend action for pending invitations (no stored status, no migration). A stored `LastMailSentAt/LastMailError` on invitations is a later option.
### Decisions on P1-P5 (Bryan, relayed 2026-11-08) - these override the proposal text above where they differ
- **P1 approved**: build the `SiteSettings` store with the mandatory allowlist `Email:AllowedFromAddresses`. Only an Owner changes it; an Administrator reads it. A "Mail" card on the Settings page. Default when nothing is set: `Email:FromAddress`.
- **P2 approved, with a rule**: sessions and refresh tokens are revoked only AFTER a new password has been chosen (a completed reset). Requesting a reset must not touch the existing password, sessions or refresh tokens. This is a hard requirement (FR-07a) with tests: request -> password unchanged, existing access token and refresh token still work; completed reset -> all refresh tokens revoked, old password rejected, reset token unusable a second time.
- **P3 changed to per user, now**: a nullable `PreferredLanguage` column on the user (additive migration, values `nl`/`en`), chosen in the profile. Fallback chain: user preference, else the site default `App:DefaultLanguage` (default `nl`). For an invitee without an account: the administrator may choose a language when inviting (stored on the invitation, copied to the new account); without a choice the site default applies (design decision D1, see application design). The password-reset mail uses the user's preference, then the site default.
- **P4 approved**: in-memory cooldown, one reset mail per address per 5 minutes, silently ignored with the identical response.
- **P5 approved**: no stored mail status; result in the response plus a resend action.
- **Operations checklist item (production)**: the sender domain must be aligned: SPF of the sender domain must authorise the SMTP service that actually sends, and that service must DKIM-sign for that domain. See section 7; carried into the Operations plan.
## 7. Read-only check of sender domains (DNS, 2026-11-08)
- `slpsoftware.nl`: SPF `v=spf1 a mx include:smtp.spf.ziggo.nl ~all`; DMARC `v=DMARC1; p=none`; DKIM record found at selector `dkim._domainkey` (public key present).
- `andreaslop.nl`: SPF `v=spf1 a mx include:smtp.spf.ziggo.nl ~all`; DMARC `v=DMARC1; p=none`; DKIM record found at selector `dkim._domainkey`.