Fix: Auto-tagging using SMTP username using plain auth (#617)

This commit is contained in:
Ralph Slooten
2026-01-16 13:50:15 +13:00
parent d50347d667
commit 45b3676e52

View File

@@ -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
}