cosullivan / SmtpServer

A SMTP Server component written in C#
MIT License
675 stars 159 forks source link

Set ServerCertificate after start (letsencrypt ) #204

Closed tinohager closed 8 months ago

tinohager commented 1 year ago

I am currently thinking about how to include letsencrypt in the startup process. I should enable the web server for the HTTP-01 challenge and then adjust the certificate in operation. But I have not seen any possibility for this. Did I miss something?

My plan

cosullivan commented 8 months ago

In the next release I've introduced an ICertificateFactory which gets called instead of a static certificate. You will be able to use this to return a new certifcate whenever needed without restarting the server.

cosullivan commented 8 months ago

I've published 10.0.0-beta1 for now which includes this change.

cosullivan commented 8 months ago

Hi,

This should now be fixed in v10.0.0 which is now published.

Please note that there is a breaking change to the mailbox filter API but its a very easy modification for implementations.

tinohager commented 6 months ago

Source Code: https://github.com/cosullivan/SmtpServer/commit/ef660d5a1bf11fc090561b3c03113d7ca5540cf4