mirror of
https://github.com/axllent/mailpit.git
synced 2026-03-03 03:57:01 +00:00
Fix: Auto-tagging using SMTP username using plain auth (#617)
This commit is contained in:
@@ -975,6 +975,12 @@ func (s *session) handleAuthPlain(arg string) (bool, error) {
|
||||
|
||||
// Validate credentials.
|
||||
authenticated, err := s.srv.AuthHandler(s.conn.RemoteAddr(), "PLAIN", parts[1], parts[2], nil)
|
||||
if authenticated {
|
||||
uname := string(parts[1])
|
||||
s.username = &uname
|
||||
} else {
|
||||
s.username = nil
|
||||
}
|
||||
|
||||
return authenticated, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user