From 51ed156dadefdd7573747239893838f5895f2b77 Mon Sep 17 00:00:00 2001 From: Bernhard Froehlich Date: Wed, 4 Jun 2025 17:41:07 +0000 Subject: [PATCH] Remove cmd/hasher for bcrypt. There are enough tools available as a replacement. You will find one that suits you. --- cmd/README.md | 6 ------ cmd/hasher.go | 22 ---------------------- smtprelay.ini | 2 +- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 cmd/README.md delete mode 100644 cmd/hasher.go diff --git a/cmd/README.md b/cmd/README.md deleted file mode 100644 index 2515a23..0000000 --- a/cmd/README.md +++ /dev/null @@ -1,6 +0,0 @@ - -To run the hasher, do like this - -```bash -$ go run hasher.go hunter2 -``` diff --git a/cmd/hasher.go b/cmd/hasher.go deleted file mode 100644 index ee8d6bb..0000000 --- a/cmd/hasher.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "golang.org/x/crypto/bcrypt" -) - -func main() { - if len(os.Args) != 2 { - fmt.Fprintln(os.Stderr, "Usage: hasher PASSWORD") - os.Exit(1) - } - password := os.Args[1] - - hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) - if err != nil { - fmt.Fprintln(os.Stderr, "Error generating hash: %s", err) - } - fmt.Println(string(hash)) -} diff --git a/smtprelay.ini b/smtprelay.ini index a6adf2c..a7183ee 100644 --- a/smtprelay.ini +++ b/smtprelay.ini @@ -83,7 +83,7 @@ ; authentication before they can send mail. ; File format: username bcrypt-hash [email[,email[,...]]] ; username: The SMTP auth username -; bcrypt-hash: The bcrypt hash of the pasword (generate with "./hasher password") +; bcrypt-hash: The bcrypt hash of the pasword ; email: Comma-separated list of allowed "from" addresses: ; - If omitted, user can send from any address ; - If @domain.com is given, user can send from any address @domain.com