diff options
author | Yves Fischer <yvesf+git@xapek.org> | 2021-05-14 00:16:01 +0200 |
---|---|---|
committer | Yves Fischer <yvesf+git@xapek.org> | 2021-05-14 00:16:01 +0200 |
commit | 1689c8bae86c8f6d347794d9ae0554cfe456f7d7 (patch) | |
tree | a4c903b0264167cb31d9fa819028a29f05b056b0 | |
parent | 62cba37229fb32baa1ee6f85c30aa200db1ce3ee (diff) | |
download | smtp-forward-1689c8bae86c8f6d347794d9ae0554cfe456f7d7.tar.gz smtp-forward-1689c8bae86c8f6d347794d9ae0554cfe456f7d7.zip |
accept all emails with any auth credentials
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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() } |