travispessetto / OrigamiSMTP

A TLS Enabled Fake SMTP Server for Development
https://travispessetto.github.io/OrigamiSMTP
MIT License
17 stars 14 forks source link

Some mailers may require a Revocation List #15

Closed travispessetto closed 2 years ago

travispessetto commented 2 years ago

When trying to use Origami STMP I got the following error from a C# application:

The server's SSL certificate could not be validated for the following reasons: • The server certificate has the following errors: • The revocation function was unable to check revocation for the certificate.

from MailKit 2.14.0

Code used for sending mail from Mailkit:

using (var client = new MailKit.Net.Smtp.SmtpClient())
          {
                // note from the documentation, if 587 is a port, using the Auto socket option will choose the correct SSL mode. -cjd 
                client.Connect(networkCredential.Domain, Port, MailKit.Security.SecureSocketOptions.Auto);
                client.Authenticate(networkCredential.UserName, networkCredential.Password);
                client.Send(mail);
                client.Disconnect(true);
           }
travispessetto commented 2 years ago

Here is my guess as to why it doesn't work:

Proposed solution:

travispessetto commented 2 years ago

There may be another problem where localhost is not a valid domain. Therefore I bought the domain name origamimail.us. The subdomain local.origamimail.us will resolve to 127.0.0.1 in hopes that this helps with issues. This means instead of using localhost local.origamimail.us will be used.

travispessetto commented 2 years ago

This appears to be fixed by commit 760a0fa6de73e33345203d76f88fe7686a0b6a70. A new root CA will need to be installed on client machine.

Commit: