Files
SluijsensandClaude Sonnet 5.5 3a9e4ae7aa E-mailfeature Operations: deployment, monitoring, productiegereedheid; configuratiefouten als Error-log
Mislukte mails door een configuratieprobleem (auth_failed, rejected_sender, tls_failed, not_configured) worden
als Error gelogd zodat Sentry een alert stuurt; timeouts en ontvangerproblemen blijven Warning.
Documentatie: uitrol per host met de hand in shared/env, rollback, monitoringplan, checklist; ASF-productie op
IIS als open punt voor een latere feature.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 09:24:19 +01:00

66 lines
5.0 KiB
Markdown

# Operations questions - identity-email-notifications
Nothing here is executed until the questions are answered (through the "CMS & API" session). Context: mail is built and tested; it is live (switched on) on ASF test only once its sender address and TLS mode are settled, and off on SlpSoftware test until its host gets the settings. Production for both sites is not part of the current approval.
## Question 1: Rolling the mail settings out
How do the mail settings reach each host?
- A) By hand by Pi-Main in the host's `shared/env` (mode 600), using the variable list in the infrastructure design (secrets stay out of Gitea); nothing in CI changes
- B) The non-secret settings (`App__PublicBaseUrl`, `Email__FromName`, ...) come from Gitea variables written by the deploy workflow; only the SMTP credentials are set by hand
- X) Other (please describe after [Answer]: tag below)
[Answer]: A (Bryan: by hand in shared/env)
## Question 2: Order of the roll-out
- A) ASF test (done) then SlpSoftware test, each with its own SMTP host, then production of each site later, one at a time, each needing its own approval
- B) ASF test, then straight to both productions together after the real test mails succeed
- X) Other (please describe after [Answer]: tag below)
[Answer]: A, BUT: ASF has no production environment yet and it will be an IIS server instead of a Raspberry Pi, so ASF production is a separate, later piece of work (not in this feature). Order now: ASF test, SlpSoftware test, then SlpSoftware production with its own approval.
## Question 3: The sender account for ASF
- A) A dedicated mailbox/account on `mail.andreaslop.nl` (for example `no-reply@andreaslop.nl`) created by Bryan for this purpose; its address goes into `Email__FromAddress` and `Email__AllowedFromAddresses__0`
- B) An existing mailbox of the site (for example `info@andreaslop.nl`), accepting that replies reach that mailbox
- X) Other (please describe after [Answer]: tag below)
[Answer]: A (no-reply@andreaslop.nl on mail.andreaslop.nl)
## Question 4: Which mail problems should raise an alert
Today a failed mail is logged at Warning level (journal only; Sentry sees Error events and uses Warnings only as breadcrumbs), and a bad mail configuration at start-up is an Error (Sentry sees it). What do you want?
- A) Nothing more: failed mails are looked at in the journal when somebody reports a problem
- B) Raise the log level to Error (so Sentry sends an alert to Bryan) for mail failures that point to a configuration problem: `auth_failed`, `rejected_sender`, `tls_failed`, `not_configured`; keep timeouts and recipient problems at Warning
- C) B, plus an alert when the same host fails at least three mails in fifteen minutes whatever the reason (a Sentry rule on the events)
- X) Other (please describe after [Answer]: tag below)
[Answer]: B (configuration-related mail failures auth_failed, rejected_sender, tls_failed, not_configured at Error level so Sentry alerts; timeouts and recipient problems stay Warning; no threshold rule)
## Question 5: Start-up check after a release
- A) The deploy's existing `/health` check stays as it is; after changing mail settings the person doing it reads the journal for `mail_status enabled=true` or `mail_configuration_invalid` (written in the runbook)
- B) A) plus the CMS reports `emailEnabled` on `/health` details so a pinger can see that mail is off on a host that should have it
- X) Other (please describe after [Answer]: tag below)
[Answer]: A (runbook line plus the journal)
## Question 6: Deliverability (SPF, DKIM, DMARC) before production
Facts today: both `slpsoftware.nl` and `andreaslop.nl` have SPF (`a mx include:smtp.spf.ziggo.nl`), a `dkim` record and DMARC `p=none`.
- A) Before production: send test mails to a Gmail and an Outlook mailbox, check in "show original" that SPF, DKIM and DMARC pass and are aligned with the From domain; leave DMARC at `p=none` for now and revisit it later
- B) A), and tighten DMARC to `p=quarantine` for the site's domain before production
- X) Other (please describe after [Answer]: tag below)
[Answer]: A (test mails to Gmail and Outlook, DMARC stays p=none for now)
## Question 7: Rollback
Rolling a release back keeps the three additive database changes (older code simply ignores the new columns and table).
- A) To switch mail off quickly: remove `Email__Smtp__Host` from `shared/env` and restart the unit (the copy-link flow keeps working); for a bad release use the existing previous-release switch of the deploy
- B) A), and additionally a documented way to drop the new columns/table (only if a restore is ever needed)
- X) Other (please describe after [Answer]: tag below)
[Answer]: A (mail off by removing Email__Smtp__Host and restarting; release rollback through the previous-release switch)
## Question 8: Who approves production readiness for this feature
- A) Bryan, after the real test mails on ASF test and SlpSoftware test and the answers above are carried out
- X) Other (please describe after [Answer]: tag below)
[Answer]: A (Bryan approves after the real test mails on ASF test and SlpSoftware test)