stunnel

You need some additional configuration before stunnel will be functional:

Adjust the configuration file:

# cp /etc/stunnel/stunnel.conf-sample /etc/stunnel/stunnel.conf
# vi /etc/stunnel/stunnel.conf
Note
If something goes wrong, try setting sslVersion to all.

Generate your certificate:

# openssl req -new -x509 -days 365 -nodes -config /etc/stunnel/stunnel.cnf -out \
/etc/stunnel/mail.pem -keyout /etc/stunnel/mail.pem

Hide the certificate from users:

# chmod 600 /etc/stunnel/mail.pem

Now you can enable and start the service:

# systemctl enable stunnel.service
# systemctl start stunnel.service