-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unable to configure SMTP to use TLS without STARTTLS #8046
Comments
I'm one of these users, and in my account, which already has a registered email, I get the |
The first thing to try is upping your log level to If the request isn't making it to the homeserver this sounds like an issue with the nginx config. |
Here are the logs. On synapse :
And on my mailserver :
So synapse is connecting to the mailserver, but the connection fails. I wondered if that was because of the TLS. I've configured Synapse to use 465 port, which is direct TLS, not STARTTLS method. And it seems Synapse doesn't handle it. I've changed the port to 587 and now it works. So, new question, why Synapse can't connect to a mailserver with direct TLS connection ? |
@Toniob What's the value of |
With port 465, it fails, with 587, it works. |
The
I do not believe there is a way to configure the initial connection to the SMTP server use TLS. (Note that Synapse uses Twisted's I'll update this issue as a request for just using TLS without STARTTLS. |
Sorry to ask here, but I am not able to get this running with synapse v1.41.0. What is now the correct configuration? The only log I see is the info log for "Sending Mail". No warnings or errors.
Sadly I am not able to get logs from the email-server. Can someone please verify that this is the correct configuration. Or do you have a hint how I can enable more logs for the twisted library to find out what the problem on my side is? |
Same problem here port 587 works, port 465 does not. The mail server itself supports 465 without issue, I have other things configured to use it over smtp via port 465 such as nextcloud, pfsense notification, grafana, etc. Port 465 is always encrypted under SSL, why is it not supported? Why do these settings even exist, couldn't they be inferred from the configured port? enable_tls: true
require_transport_security: true This is configured in the homeserver.yaml because I am on debian mine is here: but non debian users might be here: This is 587 which works: email:
smtp_host: "smtp.example.com"
smtp_port: 587
smtp_user: "noreply@example.com"
smtp_pass: "ExampleExample"
notif_from: "%(app)s Homeserver <noreply@example.com>"
client_base_url: "https://matrix.example.com"
app_name: "My Matrix"
enable_tls: true
require_transport_security: true This is 465, does not work: email:
smtp_host: "smtp.example.com"
smtp_port: 465
smtp_user: "noreply@example.com"
smtp_pass: "ExampleExample"
notif_from: "%(app)s Homeserver <noreply@example.com>"
client_base_url: "https://matrix.example.com"
app_name: "My Matrix"
# enable_tls: true
# require_transport_security: true Also tried this for 465, does not work: email:
smtp_host: "smtp.example.com"
smtp_port: 465
smtp_user: "noreply@example.com"
smtp_pass: "ExampleExample"
notif_from: "%(app)s Homeserver <noreply@example.com>"
client_base_url: "https://matrix.example.com"
app_name: "My Matrix"
enable_tls: true
# require_transport_security: true |
Previously, TLS could only be used with STARTTLS. Add a new option `implicit_tls`, where TLS is used from the start. Implicit TLS is recommended over STARTLS, see https://datatracker.ietf.org/doc/html/rfc8314 Fixes matrix-org#8046. Signed-off-by: Jan Schär <jan@jschaer.ch>
Previously, TLS could only be used with STARTTLS. Add a new option `implicit_tls`, where TLS is used from the start. Implicit TLS is recommended over STARTLS, see https://datatracker.ietf.org/doc/html/rfc8314 Fixes matrix-org#8046. Signed-off-by: Jan Schär <jan@jschaer.ch>
#10546 did not fix this. |
Previously, TLS could only be used with STARTTLS. Add a new option `force_tls`, where TLS is used from the start. Implicit TLS is recommended over STARTLS, see https://datatracker.ietf.org/doc/html/rfc8314 Fixes #8046. Signed-off-by: Jan Schär <jan@jschaer.ch>
Description
Hi. I'm the sysadmin operating converser.eu homeserver. It seems that my users can't register email in their accounts. New users can't register when they put an email.
When I try to add an email, there is a POST request to
https://converser.eu/_matrix/client/r0/account/3pid/email/requestToken
but it timeouts. On app.element.io, I've got the errorrequest failed: ETIMEDOUT
.In synapse configuration, the identity server is defined. The mailserver is configured too, and the connection to it is ok.
I've got nginx as a proxy. I've got a timeout :
2020/08/06 15:32:09 [error] 1067425#1067425: *1948 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 2a0e:xxxxxx, server: converser.eu, request: "POST /_matrix/client/r0/account/3pid/email/requestToken HTTP/2.0", upstream: "http://127.0.0.1:8008/_matrix/client/r0/account/3pid/email/requestToken", host: "converser.eu"
But no logs related to this in homeserver.log.
Am I missing something ?
Version information
Version: 1.17.0
Install method: debian package
The text was updated successfully, but these errors were encountered: