I am trying to configure Nextcloud to use the EMail feature in additional settings, however it keeps returning the following error - A problem occurred while sending the email. Please revise your settings. (Error: Unable to connect with TLS encryption)
I know this isn’t the case as I can log in to the dedicated account using my email client, using IMAP and SMTP. My server requires STARTTLS and I connect on port 587. Not sure why Nextcloud won’t connect.
Problem solved. It was because I use a self signed certificate on my mail server. Add options to StreamBuffer.php in the 3rdParty/Swiftmailer directory and all sorted now.
I changed and i don’t have eror (Error: Unable to connect with TLS encryption), but when i want to send a test email, test is in sending process and still waiting.
Hi, I’ve NC14 now and the same Problem with my own Mail-Server.
The security is all right and I also have DANE-Support !
But I have an self-signed Mail-Server certificate, which is OK with the right TLSA-Record!
In NC this is not supportet. In an “all-self-hostet system” might this be a fault.
I’ve researched and modify line 263 in file:
/var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php
no, there is no problem in the program.
I lower the security level with this setting! Because all certificates are accepted and no CA is checked. Especially since the switch exists, it only has to be adjusted.
The right way would be:
store the serial number of my self-signed mailserver-certificate in NC.
or better:
add my own CA-cert to the list of accepted CA authorities.
or best:
NC is able to check valid self-signed certificates using the TLSA record in the DNS.
this could be regarded as a problem prolly it’s unwanted to the devs.
but i see your point to NOT file an isse on github. which means: next update → all gone
I confirm that this is still an issue on Nextcloud17.0.2, and that this workaround still works, and that it would be nice to see this included as a setting in Core
Is there a way to get more detailed errors? I already know I’m doing weird things, so I’m not sure exactly where its going wrong. I did the above, but when I try to connect to 127.0.0.1 I get the generic “Could not open secure TLS connection to the IMAP server.”
Im using socat to forward 127.0.0.1:1144 to remote host 192.168.136.138 which forwards that to a service listening on 127.0.0.1:1143 on that host (not my nextcloud instance). I can connect with telnet. Just trying to get more info. Enabling Debug logging didn’t give me any more info.