rnwood / smtp4dev

smtp4dev - the fake smtp email server for development and testing
BSD 3-Clause "New" or "Revised" License
3.02k stars 339 forks source link

Docker: can't output certificate correctly #1547

Open kylegoetz opened 1 month ago

kylegoetz commented 1 month ago

If you run smtp4dev in a Docker container and then cat /smtp4dev/selfsigned-certificate.cer the output is malformed

Screen Shot 2024-08-14 at 1 07 21 PM
kylegoetz commented 1 month ago

As a note to anyone who finds themselves struggling with this, one solution to this is to run from your host machine:

openssl s_client -starttls smtp 127.0.0.1:2525

and output will include the cert, well-formed, like this:

Screen Shot 2024-08-14 at 1 14 18 PM

But it would be nice if the Docker container could output this correctly.