Mail SMTP ssl/tls failure


Hello all,
i have a problem with the nextcloud smtp mail-service.
I installed nextcloud for my company and email-traffic have to be encrypted. The mail server can only be reached by a remote connection and i have no direct access to it.
I try to send mails encrypted via ssl/tls encryption. I use non-authentification and use port:25. I tried many different settings and nextcloud gave me a couple of failure messages. When i tried using STARTLS, it said: ‘Unable to connect with TLS encryption’. Then i changed the port to 465 or 587:
‘Connection refused #111’.
When i use ssl/tls it sais: ‘Connection could not be established with host ********** [ #0]’.

I dont know what i can do, to make this work. Can anyone help me?

What is the output of the mail log?

Thanks for the response…
i am new to this whole nextcloud thing, so please forgive my inexpierence. Where can i read the mail logfiles?

cd /var/log

There are no logfiles for nextcloud. And when i cant find them. Sorry

do you have access to the settings of your own email-client?
you could gather some important informations about the correct credentials there as well…

Thats the problem. I dont have access to the client. Its administrated by a different person. I understand how difficult it is to configure something, when you dont have the whole picture. For what i understand there is no authentification needed, and it is an internal network system.

Can you ask that person to find out your mail server log file?


…about the needed credentials for your setup? that would be the most helpful thing to do here

I found this:
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1417110A:SSL routines:tls_process_server_hello:wrong ssl version at /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php#94

Now i changed this in the directory to:
return stream_socket_enable_crypto($this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
now he tells me this:
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed at /var/www/nextcloud/3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php#94

since we do know only little about your setup there’s only little help we could offer. but by reading

this thingy flashed up in my mind. it could be solved with nc14… but we’ll see.

it could be anything else, though. again: if you would know about the exact way how to address your emailserver correctly and if that would fail with your NC - there would be a better chance being able to help you better

Im sorry if anyone already answered this, but I’d start at the very first bit of that huge chain of possible errors:

Are you even allowed to use the mail server as RELAY?

1 Like