bytesafe-ce icon indicating copy to clipboard operation
bytesafe-ce copied to clipboard

SMTP without TLS

Open Cu4rach4 opened this issue 1 year ago • 3 comments

Im ussing a smtp relay without TLS, so when i try to send a invitation i gets this error:

Failed to send invite Tls: failed to verify certificate: x509: cannot validate certificate for xx.xx.xx.xx because it doesn't contain any IP SANs

it's possible to change this in code?

Cu4rach4 avatar Dec 17 '24 15:12 Cu4rach4

Assuming you are not configuring port 465, which forces legacy SSL support.

I think the problem is that your SMTP server is configured to use the STARTTLS extension which causes the client (i.e. bytesafe-ce) to upgrade to TLS, but the SMTP server sends a certificate that don't contain the host you have configured in the SMTP_HOST env variable used by bytesafe-ce.

You should be able to check this with something like (replace with your server of course):

openssl s_client -connect smtp.gmail.com:25 -debug -starttls smtp

If possible, change SMTP_HOST to one of the hostnames from the certificate or disable STARTTLS extensions.

If neither is possible we might be able to add some configuration to disable the SMTP STARTTLS extension, but I would need to check first.

wallrat avatar Dec 18 '24 09:12 wallrat

Hi, thanks for the quick reply!!!

My smtp server do not accept STARTTLS, is just ip port 25. So i will try to use smtp from cloud server. But i think it will be great if you add SMTPs STARTTLS env TRUE or FALSE

Cu4rach4 avatar Dec 18 '24 11:12 Cu4rach4

Sorry i closed by mistake

Cu4rach4 avatar Dec 18 '24 11:12 Cu4rach4