From 1a2fb56e1ee8f7bd83f99dae5a98e207cfa8a333 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sun, 8 Nov 2026 17:58:54 +0100 Subject: [PATCH] identity-email-notifications: execution plan, application design en units Co-Authored-By: Claude Sonnet 5.5 --- .../aidlc-state.md | 12 +- .../identity-email-notifications/audit.md | 12 ++ .../application-design/application-design.md | 126 ++++++++++++++++++ .../application-design/unit-of-work.md | 21 +++ .../inception/plans/execution-plan.md | 51 +++++++ .../inception/requirements/requirements.md | 8 ++ 6 files changed, 224 insertions(+), 6 deletions(-) create mode 100644 aidlc-docs/features/identity-email-notifications/inception/application-design/application-design.md create mode 100644 aidlc-docs/features/identity-email-notifications/inception/application-design/unit-of-work.md create mode 100644 aidlc-docs/features/identity-email-notifications/inception/plans/execution-plan.md diff --git a/aidlc-docs/features/identity-email-notifications/aidlc-state.md b/aidlc-docs/features/identity-email-notifications/aidlc-state.md index 924a9f5..1c07e38 100644 --- a/aidlc-docs/features/identity-email-notifications/aidlc-state.md +++ b/aidlc-docs/features/identity-email-notifications/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: identity-email-notifications - **Project Type**: Brownfield - **Start Date**: 2026-11-08 -- **Current Stage**: INCEPTION - Requirements Analysis (requirements.md written; proposals P1-P5 wait for Bryan's approval) +- **Current Stage**: INCEPTION - design presented for approval (Workflow Planning, Application Design, Units); no code before approval - **Branch**: feature/identity-email-notifications (branched from feature/andreaslop-site-hosting at e9feb37; own branch, not merged anywhere) - **Request Type**: Feature (Bryan chose real e-mail over a workaround button; relayed by session "CMS & API") @@ -40,8 +40,8 @@ ## Stage Progress ### INCEPTION - [x] Workspace Detection - Complete -- [~] Requirements Analysis - answers received, requirements.md drafted, approval pending (P1-P5) -- [ ] User Stories -- [ ] Workflow Planning -- [ ] Application Design -- [ ] Units Generation +- [x] Requirements Analysis - P1-P5 decided by Bryan (relayed); requirements.md updated +- [~] User Stories - skipped (see execution plan) +- [x] Workflow Planning - written, approval pending +- [x] Application Design - written, approval pending (choices D1, D2) +- [x] Units Generation - U1 mail-foundation, U2 identity-mail-flows, U3 password-reset diff --git a/aidlc-docs/features/identity-email-notifications/audit.md b/aidlc-docs/features/identity-email-notifications/audit.md index b5d64c5..3880da3 100644 --- a/aidlc-docs/features/identity-email-notifications/audit.md +++ b/aidlc-docs/features/identity-email-notifications/audit.md @@ -45,3 +45,15 @@ **Context**: Requirements Analysis, gate: approval of requirements.md and proposals P1-P5 pending. --- + +## Requirements Analysis / Workflow Planning / Application Design - P1-P5 decided + +**Timestamp**: 2026-11-08T18:00:00Z + +**User Input**: "(Relayed by 'CMS & API', Bryan's answers in his chat) P1: JA, SiteSettings-opslag bouwen + verplichte toegestane lijst (Email:AllowedFromAddresses) ... alleen Owner wijzigt, Beheerder leest; kaart 'Mail' bij Instellingen; default = Email:FromAddress. P2: akkoord met de forgot/reset-flow. Bryan vraagt: sessies/refresh-tokens pas intrekken NA het kiezen van een nieuw wachtwoord, niet bij het aanvragen van de reset ... P3: Bryan kiest TAAL PER GEBRUIKER NU ... kolom op de gebruiker + migratie (additief ...), keuze in het profiel, fallback op sitestandaard (App:DefaultLanguage) ... P4: JA, in-memory cooldown 1 resetmail per 5 min per adres. P5: zonder opgeslagen status (respons-resultaat + resend-knop). ... Ga door met Workflow Planning en Application Design; geen code tot ik het ontwerp aan Bryan heb voorgelegd als er keuzes zijn. Maak ook de SPF-opmerking over aligned domeinen onderdeel van het Operations-plan (checklist voor productie)." + +**AI Response**: "Updated requirements.md with the decisions (FR-07a: reset request never touches password or sessions, tests required), wrote inception/plans/execution-plan.md (three units, additive migrations), inception/application-design/application-design.md and unit-of-work.md. Open choices for Bryan: D1 invitation language (picker in the invite dialog, default proposed), D2 stamp in access tokens so a completed reset or password change ends sessions immediately (recommended)." + +**Context**: Inception documents complete; approval of requirements and design pending, no code. + +--- diff --git a/aidlc-docs/features/identity-email-notifications/inception/application-design/application-design.md b/aidlc-docs/features/identity-email-notifications/inception/application-design/application-design.md new file mode 100644 index 0000000..3af7b39 --- /dev/null +++ b/aidlc-docs/features/identity-email-notifications/inception/application-design/application-design.md @@ -0,0 +1,126 @@ +# Application Design - identity-email-notifications + +## 1. Components + +```mermaid +flowchart TB + subgraph Core["SlpModularCms.Core"] + ES["IEmailSender
SmtpEmailSender (MailKit)"] + EO["EmailOptions
(section Email) + validator"] + MR["IMailTemplateRenderer
nl/en resources, shared HTML"] + LR["ILanguageResolver
user, site default"] + SS["ISiteSettingsService
SiteSettings table"] + IM["IIdentityMailService
orchestrates one mail"] + CD["ResetCooldown
(in-memory)"] + end + subgraph Identity["Modules.Identity"] + UC["UsersController
invite, regenerate, resend,
active, role, me"] + AC["AuthController
forgot-password, reset-password"] + SC["SiteSettingsController
mail card API"] + end + subgraph FE["frontend"] + SP["Settings: Mail card"] + PR["Profile: language"] + IV["Invite dialog + users list"] + PW["Forgot / reset pages"] + end + UC --> IM + AC --> IM + AC --> CD + IM --> ES + IM --> MR + IM --> LR + IM --> SS + ES --> EO + SC --> SS + SP --> SC + PR --> UC + IV --> UC + PW --> AC + classDef core fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000; + classDef mod fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + classDef fe fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000; + class ES,EO,MR,LR,SS,IM,CD core; + class UC,AC,SC mod; + class SP,PR,IV,PW fe; +``` +Text alternative: controllers call one orchestrator (IIdentityMailService) in Core, which uses the sender, the template renderer, the language resolver and the site settings; the frontend talks only to the controllers. + +### Core +- **`IEmailSender`** (same shape as SimpleDeckApp): `Task SendAsync(string toAddress, string subject, string htmlBody, CancellationToken ct)`. A second overload carrying the plain-text part and the From override is internal to `SmtpEmailSender` through a `MailMessage` record, so the public name and first signature stay compatible. `SmtpEmailSender`: MailKit + MimeKit, StartTls when `EnableSsl`, authenticate only with a username, connect and operation timeout from options. Registered only when mail is enabled; otherwise `NullEmailSender` (returns `Disabled`) is registered so callers never null-check. +- **`EmailOptions`** (section `Email`): `FromAddress`, `FromName`, `LogoUrl` (optional, absolute or relative to `App:PublicBaseUrl`), `BrandColor` (optional `#rrggbb`), `AllowedFromAddresses` (array), `Smtp{Host, Port=587, EnableSsl=true, Username, Password, TimeoutSeconds=10}`. `App:PublicBaseUrl`, `App:DefaultLanguage` (nl|en, default nl). Validated at start when `Smtp:Host` is set: `FromAddress` valid and in `AllowedFromAddresses` (or the list is exactly that one address by default), https or localhost base URL without path, logo and colour well-formed, port 1..65535, timeout 1..60. +- **`MailSendResult`**: `Sent` bool plus `ErrorCode` (`disabled`, `not_configured`, `timeout`, `auth_failed`, `rejected`, `unknown`). No exception text, no addresses beyond the recipient domain in logs. +- **`IMailTemplateRenderer`**: `Render(MailKind kind, string language, MailModel model)` returns subject, HTML and text. One shared layout (inline CSS, tables, brand colour and optional logo, button plus raw link, footer). Resource dictionaries in code, one class per language, missing key falls back to `nl`. All dynamic values HTML-encoded; subject and display names reject CR/LF. Kinds: `Invitation`, `NewInvitationLink`, `PasswordReset`, `AccountDeactivated`, `AccountReactivated`, `RoleChanged`. +- **`ILanguageResolver`**: `Resolve(string? userLanguage)` returns `nl`/`en` using user preference, then `App:DefaultLanguage`, then `nl`. +- **`ISiteSettingsService`**: `GetMailAsync()` returns stored `FromAddress`/`FromName` or the configured defaults plus the allowlist; `SetMailAsync(address, name, actor)` validates (address must be in `AllowedFromAddresses`, name 1..80, no control characters) and stores. Table `SiteSettings` (one row, id fixed to 1). +- **`IIdentityMailService`**: `SendInvitationAsync(invitation, token, isNewLink)`, `SendPasswordResetAsync(user, token)`, `SendDeactivatedAsync/ReactivatedAsync/RoleChangedAsync(user, ...)`. Each builds the link from `PublicBaseUrl + "/admin" + path`, resolves language, renders, sends through `IEmailSender`, catches everything at the boundary, logs `identity_mail_sent`/`identity_mail_failed` (recipient domain, kind, error code) and returns `MailSendResult`. It never throws into the caller. +- **`ResetCooldown`**: singleton, `bool TryEnter(string normalizedAddress)`; one entry per address per 5 minutes; bounded memory (entries purged on access, hard cap) so it cannot grow without limit. + +### Identity module +- **`UsersController`** (existing): `POST invite` accepts optional `language`, returns `{ inviteLink, mail }`. `POST {id}/regenerate-invite` returns `{ inviteLink, mail }`. New `POST {id}/resend-invite`: resends the current link, or regenerates first when expired; same hierarchy as the other invitation actions (`UserManagementRules`). `PUT {id}/active` and `PUT {id}/role` send the notice after success (a failure of the mail never fails the action). `PUT me` accepts `language`. `UserDto`/`UserResponse` gain `language`. +- **`AuthController`** (existing): `POST auth/forgot-password {email}` anonymous, rate limited by the existing `login` limiter, identical 202 for every outcome, mail only when the account exists, is active and the cooldown allows. `POST auth/reset-password {email, token, newPassword}` anonymous, `login` limiter, validates through `UserManager.ResetPasswordAsync`; success revokes all refresh tokens (completion only); any failure answers one generic 400. +- **`SiteSettingsController`**: `GET SiteSettings/mail` (Owner, Administrator), `PUT SiteSettings/mail` (Owner only). Response includes the allowlist so the UI offers only allowed choices. +- **System capabilities** (existing `SystemController`): adds `emailEnabled` and `defaultLanguage`. + +### Frontend +Settings: "Mail" card (Owner edits: allowed address select + display name; Administrator sees it read-only). Profile: language select (nl/en, "default" option), applied immediately and saved. Invite dialog: language select (default = site default), shows the mail result with the copy-link fallback. Users list: resend action for pending invitations. Login: "Wachtwoord vergeten?" when `emailEnabled`; new pages `/forgot-password` and `/reset-password`. Everything hidden or unchanged when `emailEnabled` is false. + +## 2. Data model (all additive) +| Change | Detail | +|---|---| +| `SiteSettings` (new table) | `Id` int PK (always 1), `MailFromAddress` varchar(256) null, `MailFromName` varchar(80) null, `UpdatedAt`, `UpdatedBy` varchar(256) null | +| `Users.PreferredLanguage` | varchar(8) null | +| `Invitations.Language` | varchar(8) null | +Down migrations drop exactly these. No data is rewritten; existing rows read as null (= site default). + +## 3. Key flows + +```mermaid +sequenceDiagram + participant A as Administrator + participant U as UsersController + participant M as IdentityMailService + participant S as SmtpEmailSender + A->>U: POST Users/invite + U->>U: create invitation (existing) + U->>M: SendInvitationAsync + M->>S: SendAsync + S-->>M: sent or error code + M-->>U: MailSendResult + U-->>A: inviteLink and mail result +``` +Text alternative: the invitation is created first; the mail result (sent or error code) is returned together with the copyable link, so a mail failure never loses the invitation. + +```mermaid +sequenceDiagram + participant V as Visitor + participant AU as AuthController + participant C as ResetCooldown + participant M as IdentityMailService + V->>AU: POST forgot-password + AU->>C: TryEnter(address) + AU->>M: SendPasswordResetAsync (only if user active and allowed) + AU-->>V: 202 neutral (always the same) + V->>AU: POST reset-password with token + AU->>AU: ResetPasswordAsync (stamp changes, token single-use) + AU->>AU: revoke all refresh tokens (completion only) + AU-->>V: 200 or generic 400 +``` +Text alternative: requesting a reset only sends a mail and changes nothing else; revoking sessions happens only when a new password is actually set. + +## 4. Design decisions and open choices +- **Reset does not touch sessions on request (Bryan's rule).** `forgot-password` writes nothing except the in-memory cooldown. Tests prove: password hash, security stamp, access token and refresh tokens are unchanged after a request; after a completed reset refresh tokens are revoked, the old password fails, the token fails a second time. +- **D1 invitation language (choice, default proposed):** the administrator picks nl/en in the invite dialog (default = site default); stored on the invitation, copied to the new account's `PreferredLanguage` on completion. Alternative: always site default, no field. Default proposal = the picker. +- **D2 access tokens after a completed reset (choice, recommended: yes):** a reset or password change updates the security stamp, but today's access tokens stay valid until they expire (up to 60 minutes). Recommended: put the stamp in the access token and compare it in `ActiveUserTokenValidation`, so a completed reset (or password change) ends all sessions immediately. Cost: tokens issued before the deploy lack the claim and are refused once (refresh silently re-issues them). Alternative: leave access tokens to expire. This also closes the old gap that a password change did not end other sessions. +- **D3 sender envelope.** When a site changes its sender in the settings, the mail uses that address in `From`; the SMTP envelope sender stays the SMTP account's own address (set by the server), which is what SPF checks. The `From` domain must therefore be aligned (SPF and DKIM) for DMARC, which is why the allowlist is mandatory and the check is in the Operations checklist. +- **D4 logo and colour in mail** come from `Email:LogoUrl` / `Email:BrandColor` per site configuration (the backend does not know the frontend theme). ASF test sets the logo to `/admin/brand-logo-on-light.png`. +- **D5 message of the capability flag**: a host without mail configuration reports `emailEnabled: false`; every new UI element is hidden and every endpoint that would send answers as today. +- **D6 timeouts**: sending happens inside the request (Q8 A), so `TimeoutSeconds` bounds it; a timeout is reported as `timeout` and the fallback link is shown. + +## 5. Property-based test targets (partial PBT) +- **PBT-02 round trip**: link builder and parser: token encode then decode returns the token for any token; `forgot`/`reset` link query round trip. +- **PBT-03 invariants**: rendered HTML never contains an unencoded `<`/`"` from any display name or link; subject never contains CR/LF whatever the input; allowlist validator never accepts an address outside the list; cooldown never allows two sends within the window for one address. +- **PBT-07/08/09**: generators for tokens, display names (including control characters, unicode, very long) and addresses; seeds logged and shrinking kept on; FsCheck.Xunit (already referenced in Core.Tests). + +## 6. Security Baseline check of the design +SECURITY-03 (no PII/tokens/links in logs), 05 (all inputs validated, bounded), 08 (role checks; Owner-only settings write), 09 (no committed credentials, options validated at start), 11 (mail failure isolated, copy-link fallback), 12 (single-use time-limited tokens, uniform responses, revocation only on completion), 13 (pinned MailKit/MimeKit, scan gate), 14 (sent/failed events, alert in Operations), 15 (exceptions handled at the sender boundary): compliant by design. 01, 02, 04, 06, 07, 10: N/A or unchanged. diff --git a/aidlc-docs/features/identity-email-notifications/inception/application-design/unit-of-work.md b/aidlc-docs/features/identity-email-notifications/inception/application-design/unit-of-work.md new file mode 100644 index 0000000..1cc3810 --- /dev/null +++ b/aidlc-docs/features/identity-email-notifications/inception/application-design/unit-of-work.md @@ -0,0 +1,21 @@ +# Units of Work - identity-email-notifications + +Order: U1, then U2, then U3. Hand-back and approval after each unit. Each unit runs Code Generation with its own build and test; functional and NFR design are light and recorded in the unit's code summary. + +## U1 mail-foundation +- Core: `IEmailSender`, `SmtpEmailSender`, `NullEmailSender`, `EmailOptions` + start-up validation, `MailSendResult`, `IMailTemplateRenderer` + nl/en resources + shared layout, `ILanguageResolver`, fake sender for tests. +- `SiteSettings` table + migration, `ISiteSettingsService`, `SiteSettingsController`, Mail card (Owner edits, Administrator reads), `emailEnabled` and `defaultLanguage` in system capabilities. +- Config documentation (appsettings placeholders, env secrets `Email__Smtp__Username/Password`, smtp4dev), `Infrastructure Design` for the host. +- Tests: option validation, sender behaviour with an in-process SMTP stub, renderer (encoding, header injection, fallback), settings (allowlist, roles), PBT-02/03/07/08/09 targets for renderer and validator. + +## U2 identity-mail-flows +- Migration: `Users.PreferredLanguage`, `Invitations.Language`. Profile language select; login applies the user's language. +- `IIdentityMailService` and its use in invite, regenerate, new resend action, deactivate/reactivate and role change; response `mail` result; invite dialog language and result; resend action in the users list. +- Tests: each mail kind with the fake sender; failure never fails the action; hierarchy for resend; language fallback chain; migration up/down on MariaDB; UI tests. + +## U3 password-reset +- `forgot-password` / `reset-password`, Identity default token provider (lifetime configurable, default 60 minutes), `ResetCooldown`, revocation of refresh tokens on completion only, stamp in access tokens (decision D2), login link, `/forgot-password` and `/reset-password` pages. +- Tests: request leaves password, stamp and sessions untouched; completed reset revokes refresh tokens, old password fails, token single-use; identical responses for known and unknown addresses; cooldown; rate limiter wired; PBT for link round trip. + +## Dependencies +U2 needs U1 (sender, renderer, capabilities). U3 needs U1 and U2 (language column, mail service). No unit changes behaviour for a host without mail configuration. diff --git a/aidlc-docs/features/identity-email-notifications/inception/plans/execution-plan.md b/aidlc-docs/features/identity-email-notifications/inception/plans/execution-plan.md new file mode 100644 index 0000000..af7cb1e --- /dev/null +++ b/aidlc-docs/features/identity-email-notifications/inception/plans/execution-plan.md @@ -0,0 +1,51 @@ +# Execution Plan - identity-email-notifications + +## Detailed analysis +- **Request type**: New feature across shared Core, Identity and the admin frontend. +- **Risk**: Medium-high. It handles SMTP credentials, links that grant account access, an anonymous endpoint, and three additive database changes that run on every host (SlpSoftware included). +- **Depth**: Comprehensive. **Extensions**: Security Baseline (enforced), PBT partial (PBT-02, 03, 07, 08, 09). **Operations**: yes. +- **Lane**: Feature. + +## Stages +| Stage | Run? | Reason | +|---|---|---| +| Workspace Detection | done | | +| Reverse Engineering | skip | shared artifacts reused | +| Requirements Analysis | done (approval pending) | | +| User Stories | skip | one user type (administrators, plus the person who resets a password); acceptance criteria are in requirements.md | +| Workflow Planning | this document | | +| Application Design | run | new components (sender, templates, settings store, reset flow) | +| Units Generation | run | three units with clear dependencies | +| Functional Design | per unit, where noted below | mail rules, reset rules, language fallback | +| NFR Requirements / NFR Design | per unit, light | security-driven (tokens, anonymity, timeouts) | +| Infrastructure Design | U1 only | config keys, env secrets on the Pi, smtp4dev, SPF/DKIM alignment | +| Code Generation | each unit | per-unit build and test | +| Build and Test | once at the end | | +| Operations | yes | deployment config, monitoring, production-readiness incl. SPF alignment | + +## Units and order +```mermaid +flowchart LR + U1["U1 mail-foundation
sender, options, templates,
SiteSettings + Mail card"] --> U2["U2 identity-mail-flows
language per user, invitation,
new link, resend, notices"] + U2 --> U3["U3 password-reset
forgot/reset, cooldown,
session revocation on completion"] + classDef u fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + class U1,U2,U3 u; +``` +Text alternative: U1 (foundation) is built first, then U2 (flows that use it and the language column), then U3 (password reset, which needs both). + +| Unit | Scope | Migration | +|---|---|---| +| U1 mail-foundation | `IEmailSender` + `SmtpEmailSender`, `EmailOptions` + start-up validation, template renderer + resources (nl, en), `SiteSettings` store + service + API + Mail card, `emailEnabled` and `defaultLanguage` in system capabilities, fake sender, smtp4dev docs | new table `SiteSettings` | +| U2 identity-mail-flows | `PreferredLanguage` on users, `Language` on invitations, profile language select, invite dialog language and mail result, invitation / new-link / resend mails, deactivation, reactivation and role-change notices, resend action in the users list | columns `Users.PreferredLanguage`, `Invitations.Language` (nullable) | +| U3 password-reset | `forgot-password` / `reset-password`, Identity token provider, cooldown, revocation of refresh tokens on completion only, access-token stamp check (decision D2), login link and two pages | none (token provider is stateless) | + +All three migrations are additive, nullable (or new tables), with a working `Down`, and safe to run on SlpSoftware's database. + +## Approval and delivery gates +- Requirements and this design go to Bryan through "CMS & API" before any code (his rule for this feature). +- Each unit is built and tested (per-unit build and test), hand-back after each unit. +- Branch `feature/identity-email-notifications`; push and deploy to ASF test only with the relayed permission pattern used so far (branch push, `deploy_asf_test`; no merge, no SLP Software, no production). +- A real test mail to an address of Bryan from the test host is part of acceptance (Operations). + +## Success criteria +Mail disabled = behaviour unchanged (all existing tests green). Mail enabled = every mail kind sent correctly with a fake sender; failures never fail an action; reset request never touches password or sessions; completed reset revokes them; sender address only from the allowlist; no secrets in logs or messages. diff --git a/aidlc-docs/features/identity-email-notifications/inception/requirements/requirements.md b/aidlc-docs/features/identity-email-notifications/inception/requirements/requirements.md index 9dfa5df..e32c748 100644 --- a/aidlc-docs/features/identity-email-notifications/inception/requirements/requirements.md +++ b/aidlc-docs/features/identity-email-notifications/inception/requirements/requirements.md @@ -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`.