eclipse-ee4j / eclipse-ee4j/angus-mail
SMTP Sasl authentication failed : password is too long
- Dominant language
- Java
- Stars
- 87
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I'm connecting to a smtp server via SASL / XOAUTH2 with a long password (1508 characters)
got the error :
DEBUG SMTP: protocolConnect login, host=************.fr, user=*********@**********.fr, password=
DEBUG SMTP: Authenticate with SASL
DEBUG SMTP: SASL mechanisms allowed: XOAUTH2
DEBUG SMTP: SASL Mechanisms:
DEBUG SMTP: XOAUTH2
DEBUG SMTP:
DEBUG SMTP: SASL client XOAUTH2
DEBUG SMTP: SASL callback length: 2
DEBUG SMTP: SASL callback 0: javax.security.auth.callback.NameCallback@5af9926a
DEBUG SMTP: SASL callback 1: javax.security.auth.callback.PasswordCallback@43c67247
AUTH XOAUTH2 [LONG PASSWORD]
500 5.5.2 Line too long
DEBUG SMTP: SASL authentication failed
**Expected behavior**
I must have been connected
**Additional context**
I found the problem is in SMTPSaslAuthenticator class :

proposed solution :

Tested with the same password and it's working great.
Contributor guide
Assessment
This issue has not been assessed yet.