Browse Source

Fixes for new authentication code

Bernhard Fröhlich 3 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 {
25 25
 }
26 26
 
27 27
 func AuthReady() bool {
28
-	return (filename == "")
28
+	return (filename != "")
29 29
 }
30 30
 
31 31
 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 {
87 87
 func authChecker(peer smtpd.Peer, username string, password string) error {
88 88
 	err := AuthCheckPassword(username, password)
89 89
 	if err != nil {
90
+		log.Printf("Auth error: %v\n", err)
90 91
 		return smtpd.Error{Code: 535, Message: "Authentication credentials invalid"}
91 92
 	}
92 93
 	return nil

Loading…
Cancel
Save