I’m the proud owner of a new iPhone 3G, but have had a hard time getting my SSL IMAP email working. A bit unusual, since I’ve been involved in supporting Internet email operations since the early 90’s. I run my own IMAP server (dovecot) on Linux, and utilize SSL encrypted IMAP on standard ports. I employ a self-signed cert as the price is right, and the folks that I provide email for all know who I am or who Blackfin Software is, so ‘verified identity’ is not an issue.
It turns out that you cannot accept and store a self-signed cert from within the iPhone mail application. So - what you need to do is to get it there from your syncing host. I’ve done this on a mac, so I’m not sure if it will work from a PC. You’ll need to go through the normal procedure of setting up your IMAP mail account utilizing Mac OS X Mail. The first time it contacts your IMAP server, it will complain that the certificate presented by your mail server is not trusted. Examine/display the cert, and then click and drag the actual cert to your desktop. Once it is there, double click on it. It should open it with the ‘Keychain Access’ app. Import the certificate into your (default) login keychain and once there, go into it and modify the trust settings such that it is ‘trusted always’. Exit Keychain access. Make sure that you can quit and restart Mail, and that it is able to both receive and send email with the Mac Mail app - without asking you if you want to trust the self signed cert.
Now you’ll need to sync your iPhone with your Mac. It should pick up these new email settings as well as the new trusted certificate from your keychain. If you have another account configured on your iPhone Mail, you may need to disable it. I had to actually reboot my iPhone (turn off, turn back on), to get these settings to work. This may or may not have had to do with the fact that I had been trying to configure the account directly on the iPhone. At this point it picked up my IMAP folders, etc. YMMV.
Hope this helps….
(iPhone 3G, Mac OS X 10.4.(?)7)