Description
Requesting a password reset from a brand-new Synapse installation returns a 500 error, with the error twisted.mail._except.SMTPConnectError: Unable to connect to server.
Steps to reproduce
- On a vanilla homeserver, add the following configuration to
homeserver.yaml:
email:
enable_notifs: false
smtp_host: [hostname or ip]
smtp_port: 587
smtp_user: [username]
smtp_pass: [password]
notif_from: "Your friendly %(app)s Home Server <[email]>"
app_name: Matrix
- Restart synapse to apply changes
- Using riot, change the homeserver url and then select "Set a new password"
- Enter the valid email address and a new password
- Select "Send Reset Email"
After the last step, the server will respond with a 500 error, and the following will be displayed in synapse's log:
Oct 17 15:19:00 [hostname] synapse[11936]: synapse.handlers.identity: [POST-49] Error sending threepid validation email to [email]
Traceback (most recent call last):
File "/nix/store/1al2bnj8f2y66jxmzhi00aw3a7wp1jgw-matrix-synapse-1.4.0/lib/python3.7/site-packages/synapse/handlers/identity.py", line 347, in send_threepid_validation
yield send_email_func(email_address, token, client_secret, session_id)
twisted.mail._except.SMTPConnectError: Unable to connect to server.
And this is displayed in the postfix log of the receiving server:
Oct 17 15:19:00 [hostname] postfix/smtpd[2546]: connect from unknown[ip]
Oct 17 15:19:00 [hostname] postfix/smtpd[2546]: SSL_accept error from unknown[ip]: -1
Oct 17 15:19:00 [hostname] postfix/smtpd[2546]: warning: TLS library problem: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol:ssl/statem/statem_srvr.c:1661:
Oct 17 15:19:00 [hostname] postfix/smtpd[2546]: lost connection after STARTTLS from unknown[ip]
Oct 17 15:19:00 [hostname] postfix/smtpd[2546]: disconnect from unknown[ip] ehlo=1 starttls=0/1 commands=1/2
I've tested this configuration with both require_transport_security: false and require_transport_security: true. Also worth mentioning that the username / password are correct, as logging into the mail server from a mail program and sending a test email from there works fine.
Version information
New personal homeserver running synapse.
- Platform: NixOS running on Hetzner Cloud VM for both Matrix and mail server
Description
Requesting a password reset from a brand-new Synapse installation returns a 500 error, with the error
twisted.mail._except.SMTPConnectError: Unable to connect to server.Steps to reproduce
homeserver.yaml:After the last step, the server will respond with a 500 error, and the following will be displayed in synapse's log:
And this is displayed in the postfix log of the receiving server:
I've tested this configuration with both
require_transport_security: falseandrequire_transport_security: true. Also worth mentioning that the username / password are correct, as logging into the mail server from a mail program and sending a test email from there works fine.Version information
New personal homeserver running synapse.
Version: 1.4.0
Install method: Package Manager