Using stunnel to generate to create a self-signed certificate for SL 6 and CentOS 6

Much of this material comes from the CentOS 5 guide but applied on SL 6 and CentOS 6

The stunnel Program allows administrator to create self-signed certification using external OpenSSL Libraries included with RHEL and its clone to provide strong cryptography and protect connection.

First ensure you have your repositories enabled. For more information on SL 6 and CentOS 6, see Repository of CentOS 6 and Scientific Linux 6

# yum install stunnel

To create a self-signed SSL certificate, first go to /etc/pki/tls/certs/ directory

# cd /etc/pki/tls/certs/
# make stunnel.pem

Answer all the questions.

Once the certificate is generated, it is possible to use the stunnel command to start the Pop3d mail daemon using the following command:

# /usr/sbin/stunnel -d 995 -l /usr/sbin/pop3d pop3d

Once this command is issued, it is possible to open an POP3 email client and connect to the email server using SSL encryption.