Here's your solution (found in the Mail.app's Help file):
I'm getting a certificate-related error message
If you get an error message with the word "certificate" in it, make a copy of the message and contact your Internet service provider (ISP) or network administrator. The error message may help them diagnose your problem.
If your mail server uses a self-signed Secure Sockets Layer (SSL) certificate, each time you open Mail you'll see an error message stating that the certificate is not valid. You can continue, but you'll see the same message every time you open Mail. To stop seeing this message, you can permanently accept the certificate.
To permanently accept a self-signed SSL certificate:
Click the Show Certificate button in the error message.
The certificate appears with a certificate icon in the upper-left corner.
Hold down the Option key and drag the certificate icon to the desktop.
Double-click the certificate icon on the desktop, and choose X.509 Anchors from the pop-up menu. Click Add.
The certificate is permanently accepted.
You must have permission to administer the computer for this procedure to work.