$ sudo apt-get install stunnel4
$ sudo cp /usr/share/doc/stunnel4/examples/stunnel.conf-sample /etc/stunnel/stunnel.conf
$ vi /etc/default/stunnel4
Change:
ENABLED=0
to
ENABLED=1
$ vi /etc/stunnel/stunnel.conf
# GLOBAL
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
client=yes
[SMTP Gmail]
accept = 2525
connect = smtp.gmail.com:465
[POP3 Gmail Incoming]
accept = 110
connect = pop.gmail.com:995
Create cert
$ sudo openssl req -new -out mail.pem -keyout mail.pem -nodes -x509 -days 365
This location to move mail.pem to can be found in stunnel.conf
; Certificate/key is needed in server mode and optional in client mode
cert = /etc/stunnel/mail.pem
$ sudo mv mail.pem /etc/stunnel/mail.pem
Finally
$ sudo /etc/init.d/stunnel4 restart
In the 8890DW config, set SMTP server address to your server IP and SMTP port to 2525 (or whatever port you used). Select SMTP-AUTH, enter your email address and password.