Implicit TLS on port 465 via stunnel #2132
Replies: 3 comments 2 replies
-
Hi. My setup is much simpler.. just using some preconfigured docker image. Just add this to
(certificates are generated by certbot and the same as for STARTTLS) |
Beta Was this translation helpful? Give feedback.
-
Thanks for this information, sounds like a great workaround for now. Save your praise for @adamcooke @catphish and the others from Krystal though 🙏 |
Beta Was this translation helpful? Give feedback.
-
Update → TLS add-on for Postal delivery platform (HTTS, StartTLS, SMTPS) |
Beta Was this translation helpful? Give feedback.
-
Update: You can take a look at this repo → TLS add-on for Postal delivery platform (HTTS, StartTLS, SMTPS)
I'd like to share a simple solution for implicit TLS, because the Postal server doesn't support it yet. Unlike opportunistic TLS (STARTTLS). However, STARTTLS is not so much supported in software libraries and also RFC8314 (2018) moves away from STARTLS.
As you can see, stunnel and Postal works. After all, there is no reason for it not to work 🙂 Anyway, here's a visual glitch, 250-STARTLS. It's logical, because stunnel wraps port 25 as is, including the STARTLS offer. However, there is no reason to worry, because if the client is accessing port 465 with implicit TLS, there is no reason to follow the STARTTLS offer with additional encryption. If it did, in theory, TLS over TLS encapsulation could work. If anyone tries this, let me know 🤓
The simplest, yet working
stunnel.conf
configuration to try in the console:The port can be tested via
openssl s_client -connect postal.server:465
, via swaks (-tlsc) or directly from the mail client.The production configuration should have a limited range of protocols for security reasons (TLS 1.2, TLS 1.3), of course run in the background and so on. This is my configuration for stunnel v4 (Debian 11). If you understand cryptography and stunnel configuration, I'd be glad if you tweak the configuration file.
This configuration runs nicely on Debian 11 / systemd:
sudo systemctl enable stunnel4
sudo systemctl status stunnel4.service
I hope I helped a little. The Postal server is an excellent project and @willpower232 deserves some praise 🫡
Beta Was this translation helpful? Give feedback.
All reactions