I've got my own mail server and use IMAP and SMTP with SSL, and a self-signed SSL certificate. I tried to add the server, but when it checks the server settings, it says, "Setup could not finish - Cannot safely connect to server (Not trusted server certificate)"
I can see why this happens...