fix(email): the sender refusal now says how to fix it #144
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web!144
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "fix/sender-check-hint"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Closes #113 — mostly as already-done, plus the one part of it that was still missing.
#113 was already implemented
The cross-repo drift the issue describes is already guarded, using the issue's own recommended option 1
("assert at boot / refuse to send").
EMAIL_FROMstays hardcoded, keeping the security property thatmotivated hardcoding, and
senderAllowed()insrc/lib/email.tschecks it againstEMAIL_FROM_ALLOWED_DOMAINS, which bitborg-infra supplies(
roles/web/templates/bitborg-web.container.j2,group_vars/all/vars.yml). The check refuses beforecontacting the provider, and
unsetis deliberately distinct fromnot-allowedso a rollout does notlook like a fault. All of that is on
mainalready and covered by tests.What was missing
The issue's last paragraph asked for something that had not been done:
The message was
sender no-reply@… is not an allowed sending domainand nothing more. That mattersbecause of who reads it and when: the affected path is the sign-up credential-reset mail, so the symptom
is a sign-up that completed while the user never received their link. Someone is debugging that under
time pressure, and "not allowed" names neither what was allowed nor what makes a domain allowable.
Two things have to be true for a sending domain to work — infra must list it, and the provider must have
verified it via a DKIM delegation. The message now carries both, including the exact DNS record for the
offending domain:
Written test-first: the assertion was added and observed failing against the old message before the
message changed.
Verified
pnpm test169 passed / 16 files ·pnpm check0 errors, 0 warnings · eslint and stylelint clean ·prettier clean.