Browse Source

Fixes for new authentication code

tags/v1.2.0
Bernhard Fröhlich 7 months ago
parent
commit
b9d1663a18
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333
2 changed files with 2 additions and 1 deletions
  1. 1
    1
      auth.go
  2. 1
    0
      main.go

+ 1
- 1
auth.go View File

@@ -25,7 +25,7 @@ func AuthLoadFile(file string) error {
}

func AuthReady() bool {
return (filename == "")
return (filename != "")
}

func AuthFetch(username string) (string, string, error) {

+ 1
- 0
main.go View File

@@ -87,6 +87,7 @@ func recipientChecker(peer smtpd.Peer, addr string) error {
func authChecker(peer smtpd.Peer, username string, password string) error {
err := AuthCheckPassword(username, password)
if err != nil {
log.Printf("Auth error: %v\n", err)
return smtpd.Error{Code: 535, Message: "Authentication credentials invalid"}
}
return nil

Loading…
Cancel
Save