Here's what I did to fix my repeated errors:
Load up Keychain Access on your Mac, choose "Certificates" from the Category panel.
Find the certificate for your mail server in the list, and double click it.
In the information window that should open, Option/Alt-drag the certificate image from the top-left corner into a new message in Mail. You'll know it's done it right if you have a .PEM attachment, not a .CER one.
Send that email to yourself.
Now, on the iOS device, open the email and tap on the certificate. It should take you into Settings and allow you to install the certificate.
On my iPhone, this worked fine, but not on my iPad! You can check if it's trusted by going into Settings, General, Profiles.
Edit: Ah ha, make sure it's the one from the
system keychain, not the
login one!
Message was edited by: Drarok