[PR #11] [MERGED] Minor cleanup and fixes #58

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

📋 Pull Request Information

Original PR: https://github.com/decke/smtprelay/pull/11
Author: @JonathonReinhart
Created: 2/15/2021
Status: Merged
Merged: 2/16/2021
Merged by: @decke

Base: masterHead: minor-cleanup-fixes


📝 Commits (7)

  • b202a22 Refactor out getTLSConfig()
  • fd3f513 Don't run ListenAndServe in a goroutine
  • 4fd6bb1 Refactor common code in listener setup
  • ecf8308 Add helpful log messages for various error cases
  • 7fa0eeb Simplify range code for setting up listeners
  • 70dfe6b Only call AuthLoadFile() once at startup
  • 009ae8f hasher: Check number of arguments

📊 Changes

2 files changed (+65 additions, -65 deletions)

View changed files

📝 cmd/hasher.go (+5 -1)
📝 main.go (+60 -64)

📄 Description

This PR makes some minor cleanup and fixes:

  • Do some refactoring in main() to DRY up redundant code, and make it a little easier to read
  • Don't run ListenAndServe in a go routine -- This fixes #10
  • Add helpful log messages for various error cases caused by client misconfiguration
  • Add command line argument checking in hasher (don't segfault when password arg is missing)

🔄 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/11 **Author:** [@JonathonReinhart](https://github.com/JonathonReinhart) **Created:** 2/15/2021 **Status:** ✅ Merged **Merged:** 2/16/2021 **Merged by:** [@decke](https://github.com/decke) **Base:** `master` ← **Head:** `minor-cleanup-fixes` --- ### 📝 Commits (7) - [`b202a22`](https://github.com/decke/smtprelay/commit/b202a2209e38ee1d36f16756716ca8cc7fec0823) Refactor out getTLSConfig() - [`fd3f513`](https://github.com/decke/smtprelay/commit/fd3f513b18cb4df70ccb4b43baebfdf6b1e66ae3) Don't run ListenAndServe in a goroutine - [`4fd6bb1`](https://github.com/decke/smtprelay/commit/4fd6bb1004eaa4b043fc138b42f29ea5d93a8408) Refactor common code in listener setup - [`ecf8308`](https://github.com/decke/smtprelay/commit/ecf830865cf82f4ce46c6fd37584dbe8074c94eb) Add helpful log messages for various error cases - [`7fa0eeb`](https://github.com/decke/smtprelay/commit/7fa0eebf95a75c443398b51dc4fb66a2875d9c8a) Simplify range code for setting up listeners - [`70dfe6b`](https://github.com/decke/smtprelay/commit/70dfe6b128b8152464cfe03c20a3dd96f6690bca) Only call AuthLoadFile() once at startup - [`009ae8f`](https://github.com/decke/smtprelay/commit/009ae8f73a0fb392799452f0181f9befbef55986) hasher: Check number of arguments ### 📊 Changes **2 files changed** (+65 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `cmd/hasher.go` (+5 -1) 📝 `main.go` (+60 -64) </details> ### 📄 Description This PR makes some minor cleanup and fixes: - Do some refactoring in `main()` to DRY up redundant code, and make it a little easier to read - Don't run `ListenAndServe` in a go routine -- This fixes #10 - Add helpful log messages for various error cases caused by client misconfiguration - Add command line argument checking in `hasher` (don't segfault when password arg is missing) --- <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:11 +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#58
No description provided.