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

Can't send emails with SMTP - Getting Authentication Failed #10342

Open
EmilianoEscobedo opened this issue Jul 3, 2024 · 6 comments
Open

Can't send emails with SMTP - Getting Authentication Failed #10342

EmilianoEscobedo opened this issue Jul 3, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@EmilianoEscobedo
Copy link

EmilianoEscobedo commented Jul 3, 2024

Describe the bug
Can't send emails with SMTP using zoho as mail provider, with Authentik deployed in docker-compose. I'm using SSL port 465. Getting Authentication Failed.

To Reproduce

  1. Use the environment variables to configure SMTP as documentation says.
  2. Complete those environment variables in .env file.
  3. Try to send a mail with ak test_mail, executing docker compose exec authentik-worker ak test_email <my_mail>

Expected behavior
Test mail sent.

Screenshots
image
image

Logs
image

Version and Deployment (please complete the following information):

  • authentik version: 2024.6.0
  • Deployment: docker-compose

Additional context

This instance of Authentik is hosted in a VM of a cloud provider and its restricted in port 80/443 to be only accessible thru a VPN.

Tried from an external online SMTP tester and is working as expected with the exact same server, port, and credentials.

image

@EmilianoEscobedo EmilianoEscobedo added the bug Something isn't working label Jul 3, 2024
@EmilianoEscobedo
Copy link
Author

Hey all, I just downgraded to 2024.4.0 and everything is working as expected, so this seems to be a bug in this last release.

@flece
Copy link

flece commented Jul 9, 2024

same Version and deploymentmethod for me and i got this errormessage for testing E-Mail

ak-root/venv/lib/python3.12/site-packages/django/core/mail/backends/smtp.py", line 95, in open self.connection.login(self.username, self.password)
File "/usr/local/lib/python3.12/smtplib.py", line 739, in login
(code, resp) = self.auth(
^^^^^^^^^^
File "/usr/local/lib/python3.12/smtplib.py", line 641, in auth
response = encode_base64(initial_response.encode('ascii'), eol='')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
builtins.UnicodeEncodeError: 'ascii' codec can't encode characters in position 21-22: ordinal not in range(128)"

@BeryJu
Copy link
Member

BeryJu commented Sep 26, 2024

@flece could it be that in your .env file, the password entry has an invisible unicode character in it?

could both of you run dump_config to ensure authentik reads the .env file correctly? https://docs.goauthentik.io/docs/installation/configuration#verify-your-configuration-settings

@flece
Copy link

flece commented Sep 27, 2024

@BeryJu

i have the characters "ü" and "ß" in my password
if i dump the config it is represented as: "\u00fc" and "\u00df"

if i change to a password without this characters it worked.

@authentik-automation
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@nicoduck
Copy link

Hi,

anything new? Complex passwords cause issues with some characters, is there another way to save them to config without the scripts breaking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants