feat: mail safety (no live placeholder relayhost) + mailpit sink#27
Merged
kathrynalpert merged 1 commit intoJun 24, 2026
Merged
Conversation
85c7cdd to
d2e9d81
Compare
Security fix: the default RELAYHOST placeholder smtp.myrelay.net:587 RESOLVES on the public internet (37.97.253.64 as of 2026-06-12) -- an unconfigured install hands every outbound message (password resets, notifications) to whoever operates that host. And with no RELAYHOST at all, bokysan/docker-postfix falls back to direct-to-internet MX delivery. Neither failure announces itself. * RELAYHOST default removed; a render-time validation (validate-mail) fails with a clear message when mail.enabled is true and no RELAYHOST is set * the validation builds on the existing mail.enabled switch (added in NrgXnat#18, default false): it only bites when the bundled relay is turned on, so external-SMTP and mailpit-sink installs render clean * optional mailpit SMTP sink (mailpit.enabled, default false) for dev/test: accepts everything on :1025, stores in-container with a web UI/JSON API on :8025, architecturally cannot relay onward. Point XNAT's [notifications] SMTP host at <release>-mailpit:1025; hardened to pass restricted Pod Security Admission Verified: mail.enabled=true with no RELAYHOST fails render with the message; mail.enabled=false + mailpit.enabled=true renders the sink and zero postfix resources; relay mode with a real RELAYHOST renders; helm lint clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andrey-embarklabs
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security fix: the shipped default RELAYHOST (
smtp.myrelay.net:587) is a live host on the public internet, so an unconfigured relay would silently hand outbound mail (password resets, notifications) to a third party. This removes the default and makes RELAYHOST required when the relay is enabled.mail.enabledis true and RELAYHOST is unsetmail.enabledswitch (default false, from Adds switch for postfix dependency #18): the bundled postfix relay stays off unless explicitly enabled, so external-SMTP or sink installs render cleanmailpit.enabled, default false) for dev/test: accepts everything on :1025, stores in-container with a web UI/JSON API on :8025, cannot relay onward. Point XNAT's [notifications] SMTP host at<release>-mailpit:1025. Hardened to pass restricted Pod Security Admission.No manual Chart.yaml version bump — left to the release workflow (feat → minor).
Verified: default values (mail off) render clean;
mail.enabled=truewith no RELAYHOST fails render;mail.enabled=false+mailpit.enabled=truerenders the sink and zero postfix resources; relay mode with a real RELAYHOST renders; helm lint clean.