feat(onprem): mails come from the installation, not from us #144

Closed
sharang wants to merge 2 commits from feat/onprem-mail into feat/onprem-directory-users
pull from: feat/onprem-mail
Owner

Stacked on #143 (which is on #142): merge those first, then retarget this to main.

What

On APP_ENV=onprem the registry's mails (new findings, published documents) come from the customer's installation, through their relay and from their address. Until now they carried our company signature (address, register entry, noreply@/kontakt@breakpilot.com) and our imprint and privacy links.

  • mail.View gets a Site. Its zero value is the cloud, so cloud mails are unchanged.
  • On-prem the signature is a short note that the installation sent the mail, plus MAIL_CONTACT (their IT) if set.
  • The legal line shows the customer's LEGAL_IMPRINT_URL / LEGAL_PRIVACY_URL, each only when set. The cloud keeps ours as defaults.
  • The legal line moved from each text template into signature.tmpl.
  • On-prem the registry refuses to start when MAIL_FROM, PORTAL_URL, INVITE_REDIRECT_URI or LEGAL_* point at breakpilot.com.
  • Spelling "Breakpilot" in the templates and the default MAIL_FROM_NAME.

Cloud impact

All eight cloud mails (4 kinds × de/en) were rendered with the old and the new templates. They are byte-identical except "BreakPilot" → "Breakpilot" (signature "Ihr Breakpilot-Team", the document text, the default sender name).

Tests

go test -short -race ./..., go vet, gofmt clean.

  • TestRender_onPrem: for both kinds and languages, no company data or breakpilot.com; the customer's contact (HTML-escaped) and links appear; without them, no legal line, no contact and no empty link.
  • TestRender_cloudLegalLinks: cloud defaults, and the override.
  • TestOnPrem_notificationMailIsTheInstallations: queue → drain → recorder, end to end.
  • Config: the four breakpilot.com refusals; on-prem defaults are empty.

🤖 Generated with Claude Code

Stacked on #143 (which is on #142): merge those first, then retarget this to `main`. ## What On `APP_ENV=onprem` the registry's mails (new findings, published documents) come from the customer's installation, through their relay and from their address. Until now they carried our company signature (address, register entry, `noreply@`/`kontakt@breakpilot.com`) and our imprint and privacy links. - `mail.View` gets a `Site`. Its zero value is the cloud, so cloud mails are unchanged. - On-prem the signature is a short note that the installation sent the mail, plus `MAIL_CONTACT` (their IT) if set. - The legal line shows the customer's `LEGAL_IMPRINT_URL` / `LEGAL_PRIVACY_URL`, each only when set. The cloud keeps ours as defaults. - The legal line moved from each text template into `signature.tmpl`. - On-prem the registry refuses to start when `MAIL_FROM`, `PORTAL_URL`, `INVITE_REDIRECT_URI` or `LEGAL_*` point at `breakpilot.com`. - Spelling "Breakpilot" in the templates and the default `MAIL_FROM_NAME`. ## Cloud impact All eight cloud mails (4 kinds × de/en) were rendered with the old and the new templates. They are byte-identical except "BreakPilot" → "Breakpilot" (signature "Ihr Breakpilot-Team", the document text, the default sender name). ## Tests `go test -short -race ./...`, `go vet`, `gofmt` clean. - `TestRender_onPrem`: for both kinds and languages, no company data or `breakpilot.com`; the customer's contact (HTML-escaped) and links appear; without them, no legal line, no contact and no empty link. - `TestRender_cloudLegalLinks`: cloud defaults, and the override. - `TestOnPrem_notificationMailIsTheInstallations`: queue → drain → recorder, end to end. - Config: the four `breakpilot.com` refusals; on-prem defaults are empty. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-20 08:16:36 +00:00
On APP_ENV=onprem the registry's mails (new findings, published documents)
no longer carry our company signature, address, register entry, contact
address or legal pages. They say the installation sent them, name the
customer's contact (MAIL_CONTACT) and link the customer's imprint and
privacy notice (LEGAL_IMPRINT_URL, LEGAL_PRIVACY_URL), each only when set.

mail.View gets a Site; the zero value is the cloud, so cloud mails stay as
they were (checked byte for byte against the previous templates) apart from
the spelling "Breakpilot", also in the default sender name. The legal line
moved from every text template into signature.tmpl.

On-prem the registry also refuses to start when MAIL_FROM, PORTAL_URL,
INVITE_REDIRECT_URI or LEGAL_* point at breakpilot.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CODEOWNERS rules requested review from Benjamin_Boenisch 2026-11-20 08:16:36 +00:00
sharang added 1 commit 2026-11-20 11:00:50 +00:00
Author
Owner

Merged as part of #146 (the same commits on today's main; migration renumbered to 0033).

Merged as part of #146 (the same commits on today's main; migration renumbered to 0033).
sharang closed this pull request 2026-11-20 16:31:13 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.