Here's how to get IMAP on the iphone working with a self-signed SSL cert: http://io.yort.com/self-signed-imap-ssl-certs-on-iphone/