Browse Source

The check if authentication was properly done is redundant now as of smtpd v0.2.0

See:	https://github.com/chrj/smtpd/commit/32be721d714c49abba11b0a3ba006ed6d8d50d8c
Bernhard Froehlich 5 years ago
parent
commit
6f3bd16988
1 changed files with 0 additions and 4 deletions
  1. 0 4
      main.go

+ 0 - 4
main.go

@@ -94,10 +94,6 @@ func authChecker(peer smtpd.Peer, username string, password string) error {
 }
 
 func mailHandler(peer smtpd.Peer, env smtpd.Envelope) error {
-	if *allowedUsers != "" && peer.Username == "" {
-		return smtpd.Error{Code: 530, Message: "Authentication Required"}
-	}
-
 	peerIP := ""
 	if addr, ok := peer.Addr.(*net.TCPAddr); ok {
 		peerIP = addr.IP.String()