Let the submission listener run without the PROXY protocol #87

Merged
calvin merged 1 commit from submission-no-proxy into master 2026-11-13 01:13:01 +00:00
Owner

KARTA_SMTP_TRUSTED_PROXIES applied to every listener. A deployment whose port 25 comes in through a relay with the PROXY protocol (staging: HAProxy on a second host) therefore could not also let an application on the same host submit mail directly: the submission listeners wanted the header too.

KARTA_SMTP_SUBMISSION_TRUSTED_PROXIES gives the submission listeners (587, 465) their own list; an empty value means no proxy. Unset, they follow KARTA_SMTP_TRUSTED_PROXIES exactly as before, so nothing changes for an existing deployment. Spaces around the ranges are now ignored.

Changed: config/runtime.exs, the configuration reference and the SMTP listeners guide, CHANGELOG (Unreleased). Nothing else.

Verified: test/karta/runtime_config_test.exs run once (16 tests pass, 4 of them new: no proxies, inheritance, empty override, own ranges), Code.format_string! clean on the two files. Not verified: the full suite and credo (manager's check); behaviour against a live listener (needs the certificate and the deployment).

🤖 Generated with Claude Code

`KARTA_SMTP_TRUSTED_PROXIES` applied to every listener. A deployment whose port 25 comes in through a relay with the PROXY protocol (staging: HAProxy on a second host) therefore could not also let an application on the same host submit mail directly: the submission listeners wanted the header too. `KARTA_SMTP_SUBMISSION_TRUSTED_PROXIES` gives the submission listeners (587, 465) their own list; an empty value means no proxy. Unset, they follow `KARTA_SMTP_TRUSTED_PROXIES` exactly as before, so nothing changes for an existing deployment. Spaces around the ranges are now ignored. Changed: `config/runtime.exs`, the configuration reference and the SMTP listeners guide, CHANGELOG (Unreleased). Nothing else. **Verified:** `test/karta/runtime_config_test.exs` run once (16 tests pass, 4 of them new: no proxies, inheritance, empty override, own ranges), `Code.format_string!` clean on the two files. **Not verified:** the full suite and credo (manager's check); behaviour against a live listener (needs the certificate and the deployment). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Let the submission listener run without the PROXY protocol
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
c89d66affe
KARTA_SMTP_TRUSTED_PROXIES applied to every listener, so a deployment whose
port 25 comes in through a relay with the PROXY protocol could not also let an
application on the same host submit mail directly.
KARTA_SMTP_SUBMISSION_TRUSTED_PROXIES gives the submission listeners their own
list (empty: none); unset, they follow KARTA_SMTP_TRUSTED_PROXIES as before.
Spaces around the ranges are ignored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
calvin merged commit 722ef2abf5 into master 2026-11-13 01:13:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
external/karta!87
No description provided.