I thought the problem was with the email application of n900 itself, i did not know you were using a personal mailserver.
echo | openssl s_client -connect mail.liukuma.net:993 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cert.pem