authentik icon indicating copy to clipboard operation
authentik copied to clipboard

Confirmation email not sent to user

Open GD-Dal opened this issue 1 year ago • 7 comments

Describe the bug I try to create a flow that allows users to sign up. That works, but they never get an email.

The event log creates System task exception like this:

`Exception

Task send_mail encountered an error: Traceback (most recent call last): File "/ak-root/venv/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task R = retval = fun(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "/ak-root/venv/lib/python3.11/site-packages/sentry_sdk/integrations/celery.py", line 280, in _inner reraise(*exc_info) File "/ak-root/venv/lib/python3.11/site-packages/sentry_sdk/_compat.py", line 115, in reraise raise value File "/ak-root/venv/lib/python3.11/site-packages/sentry_sdk/integrations/celery.py", line 275, in _inner return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/ak-root/venv/lib/python3.11/site-packages/celery/app/trace.py", line 760, in protected_call return self.run(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ak-root/venv/lib/python3.11/site-packages/celery/app/autoretry.py", line 60, in run ret = task.retry(exc=exc, **retry_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ak-root/venv/lib/python3.11/site-packages/celery/app/task.py", line 736, in retry raise_with_context(exc) File "/ak-root/venv/lib/python3.11/site-packages/celery/app/autoretry.py", line 38, in run return task._orig_run(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/authentik/stages/email/tasks.py", line 108, in send_mail raise exc File "/authentik/stages/email/tasks.py", line 74, in send_mail backend.open() File "/ak-root/venv/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 85, in open self.connection = self.connection_class( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/smtplib.py", line 255, in init (code, msg) = self.connect(host, port) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/smtplib.py", line 341, in connect self.sock = self._get_socket(host, port, self.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/smtplib.py", line 312, in _get_socket return socket.create_connection((host, port), timeout, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ak-root/venv/lib/python3.11/site-packages/sentry_sdk/integrations/socket.py", line 66, in create_connection return real_create_connection( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) builtins.ConnectionRefusedError: [Errno 111] Connection refused

`

To Reproduce Easily reproduced by creating a new user

Version and Deployment (please complete the following information):

  • authentik version: 2023.10.5
  • Deployment: Unraid Docker

Additional context Sending a test email using ha test_email works fine

GD-Dal avatar Jan 05 '24 12:01 GD-Dal

Looks the same as

#8049

whitephoenix117 avatar Jan 06 '24 17:01 whitephoenix117

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.

This seems to still be broken

On Wed, Mar 6, 2024, 20:40 authentik-automation[bot] < @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/goauthentik/authentik/issues/8071#issuecomment-1982184291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOBE6KSQQ3YO4ZC52WKV6TYW7AR7AVCNFSM6AAAAABBOLPAZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBSGE4DIMRZGE . You are receiving this because you commented.Message ID: @.***>

whitephoenix117 avatar Mar 07 '24 02:03 whitephoenix117

Can confirm, still not working

GD-Dal avatar Mar 07 '24 08:03 GD-Dal

It seems that authentik does not connect to your email server and gets a "connection refused". Check your email settings: https://docs.goauthentik.io/docs/troubleshooting/emails

rissson avatar Mar 15 '24 16:03 rissson

ak test_email -S email-account-confirmation and ak test_email

Work perfectly fine, and I'm receiving the test emails

GD-Dal avatar Mar 15 '24 17:03 GD-Dal

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.