Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP Sasl authentication failed : password is too long #155

Open
pniotout opened this issue Sep 27, 2024 · 0 comments
Open

SMTP Sasl authentication failed : password is too long #155

pniotout opened this issue Sep 27, 2024 · 0 comments

Comments

@pniotout
Copy link

pniotout commented Sep 27, 2024

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 :
image

proposed solution :
image

Tested with the same password and it's working great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant