summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorYves Fischer <yvesf+git@xapek.org>2021-05-14 00:16:01 +0200
committerYves Fischer <yvesf+git@xapek.org>2021-05-14 00:16:01 +0200
commit1689c8bae86c8f6d347794d9ae0554cfe456f7d7 (patch)
treea4c903b0264167cb31d9fa819028a29f05b056b0 /main.go
parent62cba37229fb32baa1ee6f85c30aa200db1ce3ee (diff)
downloadsmtp-forward-1689c8bae86c8f6d347794d9ae0554cfe456f7d7.tar.gz
smtp-forward-1689c8bae86c8f6d347794d9ae0554cfe456f7d7.zip
accept all emails with any auth credentials
Diffstat (limited to 'main.go')
-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()
}