Forums Archived

This forum has been archived. No new posts can be made and no new users can sign up. It remains here for reference only.

Find the new forums here

Error sending Email via external smtps

  • 358 Views
  • Last Post 04 January 2022
webcraft posted this 28 December 2021

I setup an external mail server in AMP. The email isn't send and I get this error:

Unable to send email: System.Net.Mail.SmtpException: Message could not be sent. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER at /usr/src/mono/external/boringssl/ssl/tls_record.c:217 at Mono.Btls.MonoBtlsContext.ProcessHandshake ()

The login details are correct because I copied them to Outlook and I was able to login using them.

Debian 11 - AMP 2.3.0.8 - TLSv1.2 and v1.3 (both not working)

Order By: Standard | Newest | Votes
webcraft posted this 28 December 2021

Ok, apparently, newer TLS versions as well as STARTTLS are not supported. Just figured out this is the same when I use TLSv1.3 on the reverse proxy on the controller, the target can no longer communicate. It's a different problem and likely different library that causes this issue but maybe the dependencies can be updated in general at some time to support newer openssl versions.

*Edit: * This is no solution. Sending email via an external exim server on a default Debian 11 setup (Debian package) doesn't work with AMP but works with e.g. Outlook.

webcraft posted this 29 December 2021

I've tried to connect to ionos which supports multiple tls versions I suppose and this gives me the following error:

Unable to send email: System.Net.Mail.SmtpException: Message could not be sent. ---> System.IO.IOException: Connection closed at System.Net.Mail.SmtpClient.Read ()

If I turn of SSL in the AMP settings and send via port 25, it is working with unchanged credentials. Can you please have a look how to fix the SSL problem? Thanks

Mike posted this 29 December 2021

It may not be fixable at this time on Linux systems. TLS 1.2 should work fine though. Are you able to turn on full debug logging? https://github.com/CubeCoders/AMP/wiki/Diagnosing-AMP-issues

webcraft posted this 29 December 2021

This is the error when exim is configured to use STARTTLS:

Unable to send email: System.Net.Mail.SmtpException: Message could not be sent. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER at /usr/src/mono/external/boringssl/ssl/tls_record.c:217 at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00048] in <89c0593a45af442582ca75c3a3483f44>:0 at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in <89c0593a45af442582ca75c3a3483f44>:0 at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool) at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00006] in <89c0593a45af442582ca75c3a3483f44>:0 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in <89c0593a45af442582ca75c3a3483f44>:0 --- End of inner exception stack trace --- at Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0004b] in <89c0593a45af442582ca75c3a3483f44>:0 at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient(string,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Authentication.SslProtocols,bool) at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00006] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.InitiateSecureConnection () [0x0005b] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x000a0] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00050] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00084] in <89c0593a45af442582ca75c3a3483f44>:0 --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient+<>c__DisplayClass90_0.<sendasync>b__0 (System.Object o, System.ComponentModel.DoWorkEventArgs ea) [0x0002c] in <89c0593a45af442582ca75c3a3483f44>:0 at System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) [0x0000a] in <89c0593a45af442582ca75c3a3483f44>:0 at System.ComponentModel.BackgroundWorker.WorkerThreadStart (System.Object argument) [0x0000e] in <89c0593a45af442582ca75c3a3483f44>:0 --- End of stack trace from previous location where exception was thrown --- at EmailSenderPlugin.PluginMain.SendMail (System.String To, System.String Subject, System.String Message, System.Net.Mail.MailPriority Priority) [0x0013f] in <fd2cbd7f73b045439373025011a6e080>:0

And this one with TLSv1.2:

Unable to send email: System.Net.Mail.SmtpException: Message could not be sent. ---> System.IO.IOException: Connection closed at System.Net.Mail.SmtpClient.Read () [0x000bd] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00000] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00050] in <89c0593a45af442582ca75c3a3483f44>:0 at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00084] in <89c0593a45af442582ca75c3a3483f44>:0 --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient+<>c__DisplayClass90_0.<sendasync>b__0 (System.Object o, System.ComponentModel.DoWorkEventArgs ea) [0x0002c] in <89c0593a45af442582ca75c3a3483f44>:0 at System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) [0x0000a] in <89c0593a45af442582ca75c3a3483f44>:0 at System.ComponentModel.BackgroundWorker.WorkerThreadStart (System.Object argument) [0x0000e] in <89c0593a45af442582ca75c3a3483f44>:0 --- End of stack trace from previous location where exception was thrown --- at EmailSenderPlugin.PluginMain.SendMail (System.String To, System.String Subject, System.String Message, System.Net.Mail.MailPriority Priority) [0x0013f] in <fd2cbd7f73b045439373025011a6e080>:0</fd2cbd7f73b045439373025011a6e080></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></sendasync></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></fd2cbd7f73b045439373025011a6e080></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></sendasync></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44></89c0593a45af442582ca75c3a3483f44>

webcraft posted this 04 January 2022

No, this is not working for me with TLSv1.2.

Close