Creating a configuration file

Procedure

  1. Enter the following command to open the stunnel.conf file:
    $sudo vi /etc/stunnel/stunnel.conf
  2. Comment out the features that you do not require, such as the [pop3s], [ssmtp], and [imaps] sections.
  3. Change the cert=/etc/stunnel/mail.pem line to cert=/etc/stunnel/stunnel.pem.
  4. Add the following lines and save the file.
    ; Certificate/key is needed in server mode
    cert = /etc/stunnel/stunnel.pem
    key = /etc/stunnel/stunnel.pem
    
    ; Some debugging stuff useful for troubleshooting
    debug = 7
    foreground=yes
    
    [ssyslog]
    accept = 60514
    connect = 61514