[PR #27] [MERGED] Don't allow configuration requiring authentication with non-TLS listener #68

Closed
opened 2026-02-26 18:33:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/decke/smtprelay/pull/27
Author: @JonathonReinhart
Created: 4/1/2021
Status: Merged
Merged: 4/2/2021
Merged by: @decke

Base: masterHead: 26-tls-reqd-for-auth


📝 Commits (3)

  • ca1ccd8 Refactor parsing of -listen string out into separate config function
  • 45a676e Add localAuthRequired() helper function
  • 247d187 Don't allow a configuration requiring auth with a non-TLS listener

📊 Changes

3 files changed (+106 additions, -26 deletions)

View changed files

📝 config.go (+42 -2)
config_test.go (+44 -0)
📝 main.go (+20 -24)

📄 Description

This fixes #26.

Now if someone tries to run smtprelay with -allowed_users and any non-TLS address in -listen, it will fail right away:

$ ./smtprelay -listen ':2525' -allowed_users userlist.txt 
WARN[2021-04-01T01:03:57-04:00] remote_host not set; mail will not be forwarded! 
FATA[2021-04-01T01:03:57-04:00] Local authentication (via allowed_users file) not allowed with non-TLS listener  address=":2525"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/decke/smtprelay/pull/27 **Author:** [@JonathonReinhart](https://github.com/JonathonReinhart) **Created:** 4/1/2021 **Status:** ✅ Merged **Merged:** 4/2/2021 **Merged by:** [@decke](https://github.com/decke) **Base:** `master` ← **Head:** `26-tls-reqd-for-auth` --- ### 📝 Commits (3) - [`ca1ccd8`](https://github.com/decke/smtprelay/commit/ca1ccd85e343037699249edbebd2fd84f5158230) Refactor parsing of -listen string out into separate config function - [`45a676e`](https://github.com/decke/smtprelay/commit/45a676e27423673b7fea1d64cdbd17a7c684c001) Add localAuthRequired() helper function - [`247d187`](https://github.com/decke/smtprelay/commit/247d187576637efd490b5337a246d01083c4438c) Don't allow a configuration requiring auth with a non-TLS listener ### 📊 Changes **3 files changed** (+106 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `config.go` (+42 -2) ➕ `config_test.go` (+44 -0) 📝 `main.go` (+20 -24) </details> ### 📄 Description This fixes #26. Now if someone tries to run `smtprelay` with `-allowed_users` and any non-TLS address in `-listen`, it will fail right away: ``` $ ./smtprelay -listen ':2525' -allowed_users userlist.txt WARN[2021-04-01T01:03:57-04:00] remote_host not set; mail will not be forwarded! FATA[2021-04-01T01:03:57-04:00] Local authentication (via allowed_users file) not allowed with non-TLS listener address=":2525" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 18:33:14 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
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
starred/smtprelay#68
No description provided.