summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index ef7440a..bbf2211 100644
--- a/main.go
+++ b/main.go
@@ -150,6 +150,11 @@ func main() {
Addr: *flagListen,
Hostname: *flagHostname,
Handler: logWrapper(makeHandleEmail(mapping)),
+ AuthMechs: map[string]bool{"LOGIN": true, "PLAIN": true},
+ AuthHandler: func(remoteAddr net.Addr, mechanism string, username []byte, password []byte, shared []byte) (bool, error) {
+ log.Printf("accept auth %v %v", string(username), string(password))
+ return true, nil
+ },
}
_ = server.ListenAndServe()
}