Quick steps to configure stunnel4 for client mode

It is really simple to add POP3 SSL support to your existing e-mail client which does not support it, or whatever SSL support you want using stunnel. I just cannot remember all the steps to set up clean system. So I have created this small guide which will help me in future and may be will help somebody else too.

  1. Install stunnel if you don’t have it installed already: sudo apt-get install stunnel
  2. Allow stunnel to autostart by editing stunnel defaults file: sudo gedit /etc/default/stunnel4
  3. Finally perform the following task on the /etc/stunnel/stunnel.conf file:
    1. Comment the following line, so that we want have to generate certificate, because we don’t need it in client mode: ;cert = /etc/ssl/certs/stunnel.pem
    2. Change sslVersion to all if you need support for all SSL types
    3. Uncomment the following line: client = yes
    4. Add definition for client vs. server ports. In my case I was redirecting to FastMail:
      [pop3]
      accept = 1109
      connect = mail.messagingengine.com:995

Leave a Reply

Your email address will not be published. Required fields are marked *