Checking new email by korn or biff on secure-connection-require mail servers with stunnel
You can use email application to check if you have new email messages even if the application does not support secure connections and your server requires an encrypting. The solution is stunnel utility. Stunnel opens a port on your local machine and redirects all traffic directed to this port to a different port on another machine using SSL (i.e. secure) connection.
If, for example, your email notification application (Korn in my case) cannot use IMAPS connections but IMAP4 only, you have to set stunnel in such a way that Korn connects unsecurely (using IMAP4) to the port on your local machine and than stunnel redirects packets thru a secure connection to a proper port on your email server.
Let's start. Create or modify '/etc/stunnel/stunnel.conf' file with the content:
pid = /stunnel.pid
setuid = root
[my_imaps_tunneling]
accept = 2143
connect = your.email.server.com:993
Now you only need to configure Korn to connect to localhost at port 2143 (you can choose another unused port number) . Now you have to run '/usr/sbin/stunnel'
If you want stunnel running just after reboot or restart of your machine add:
/usr/sbin/stunnel
line in at the bottom of your '/etc/rc.d/rc.local' file.

