Email TLS Issue

Hello,

I’ve just upgraded from 2018.X to 2019.5.4 and we are now encountering an issue with sending emails. This occurs using the Send Email deployment step or via the administration SMTP test page.

We have configured Octopus to use SMTP port 25 and SSL/TLS is not checked.

When sending an email we receive the following error:

An error occurred while attempting to establish an SSL or TLS connection.

The SSL certificate presented by the server is not trusted by the system for one or more of the following reasons:
1. The server is using a self-signed certificate which cannot be verified.
2. The local system is missing a Root or Intermediate certificate needed to verify the server's certificate.
3. The certificate presented by the server is expired or invalid.

See https://github.com/jstedfast/MailKit/blob/master/FAQ.md#InvalidSslCertificate for possible solutions.
MailKit.Security.SslHandshakeException
   at MailKit.Net.Smtp.SmtpClient.ConnectAsync
   at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
   at Octopus.Core.Util.SmtpClient.SmtpClientWrapper.CreateSmtpClient(SmtpConfiguration configuration, CancellationToken token)
   at Octopus.Core.Util.SmtpClient.SmtpClientWrapper.Send(SmtpConfiguration configuration, MailMessage message, CancellationToken token)
   at Octopus.Server.Orchestration.ServerTasks.TestEmail.TestEmailTaskController.Execute()
   at Octopus.Server.Orchestration.ServerTasks.RunningTask.RunMainThread()

--Inner Exception--
The remote certificate is invalid according to the validation procedure.
System.Security.Authentication.AuthenticationException
   at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)

As stated, we’re not using SSL/TLS so we’re not sure why this error is displaying. We are using an Exchange server on our local domain for sending.

Any thoughts on this?

Hi,

Thanks for getting in touch and I’m sorry to hear you’ve hit this bug.

We have an open issue for this bug, and will ship a fix for it as soon as possible.

My sincere apologies for the inconvenience caused.

Thank you and best regards,
Henrik

Ah great, you beat me to it :slight_smile:

I’ll subscribe to the GH issue, any ideas on a rough timeline for the fix?

Thank you!

It should be a pretty quick change as we just need to change the constructor we use for our SMTP client wrapper, so I’m hopeful we’ll be able to ship a fix early next week.

Cheers,
Henrik

1 Like

Hi,

​Just wanted to send a quick update that we’ve just shipped 2019.5.5 that contains a fix for this email issue.

​If, after upgrading, you are still experiencing this issue, please do not hesitate to let me know.

​Thank you and best regards,
​Henrik

1 Like

Thank you! Giving it a go now :slight_smile:

Can confirm this is now working again, many thanks Henrik!

Great news! Thanks for letting me know.

Cheers,
Henrik

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.