AFP548

Securing Tiger Server IMAP, POP, and SMTP with self-signed SSL

One of the great new additions to Tiger Server is the ability to easily create self-signed SSL certificates to secure services such as LDAP, Jabber IM, and mail. This article will cover my own implementation of SSL for mail services, however, it will probably be helpful to anyone wishing to secure mail services on their Tiger Server.

(Ed. Note: On our list of articles we should be working on includes one on Certificate Assistant which will allow for better control of your SSL certificates then Server Admin allows. But in the mean time this is a great overview of how to get SSL started on Tiger.)

The first step in securing mail services is to create a certificate for your mail server. You can obtain a certificate from a recognized root authority for a price, or you can create your own self-signed certificate. Because of the low volume of traffic and few users I host, I chose a self-signed certificate.

Here’s how to create one:

A certificate named after your mail server should now be present under the Certificates tab, and the authority should be Self Signed.

Next, the certificate has to be assigned to the mail server process.

All ready to go! Well, usually. I ran into a snag. See, I upgraded my server from 10.3.9 to 10.4, and as outlined in this Apple KB article, a netinfo group called certusers wasn’t created. The fact that this group is missing causes errors in the system log:

Jul 7 12:19:14 kitty imaps[4456]: TLS server engine: cannot load cert/key data
Jul 7 12:19:14 kitty imaps[4456]: error initializing TLS
Jul 7 12:19:14 kitty imaps[4456]: Fatal error: tls_init() failed

This problem is easy to correct. The following command needs to be issued in the Terminal to create the group:

echo 'certusers:*:29:root,jabber,postfix,cyrusimap' | sudo niload group .

Restart the server. SSL-enabled mail should be working. Be sure to set up your mail client to use SSL SMTP and POP or IMAP, and open TCP port 993 in your firewall if necessary.

The first time you check your SSL-enabled mail, an alert will likely appear notifying you that the certificate from the mail server is not from a root certificate authority. That’s no problem. The certificate needs to be added to the X509Anchors keychain so that you will not be prompted each time the client encounters it. Here are the instructions to do that with Mail 2.0.

You should no longer be prompted to accept the certificate. Mail will now accept it automatically because it’s contained in the X509Anchors keychain.

Exit mobile version