Certificate issues on OSX

I have an error returned every time I try to connect to my mailbox with Apple’s mail.app. I have added dreamhost to my etc/hosts and I have added the certificate to my trusted list, but the error persists. It doesn’t actually prevent me from connecting, it’s just really annoying to have to tell mail to connect every time I open mail. Has anyone found a solution to this problem?