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>
This commit is contained in:
2026-11-09 09:24:19 +01:00
co-authored by Claude Sonnet 5.5
parent 0e86125f12
commit 3a9e4ae7aa
13 changed files with 243 additions and 12 deletions
@@ -9,21 +9,21 @@ How do the mail settings reach each host?
- 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]:
[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]:
[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]:
[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?
@@ -33,14 +33,14 @@ Today a failed mail is logged at Warning level (journal only; Sentry sees Error
- 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]:
[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]:
[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`.
@@ -48,7 +48,7 @@ Facts today: both `slpsoftware.nl` and `andreaslop.nl` have SPF (`a mx include:s
- B) A), and tighten DMARC to `p=quarantine` for the site's domain before production
- X) Other (please describe after [Answer]: tag below)
[Answer]:
[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).
@@ -56,10 +56,10 @@ Rolling a release back keeps the three additive database changes (older code sim
- 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]:
[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]:
[Answer]: A (Bryan approves after the real test mails on ASF test and SlpSoftware test)