About secure connections for Messages

Using the Server app, you can secure server-to-server communication with certificates.

OS X Server includes a preinstalled, default, self-signed certificate, or you can select your own certificate. The selected certificate is used for client-to-server communications on ports 5222 and 5223 and for server-to-server communications.

Jabber provides the following ports:

SSL encrypts your chat message over the network between client-to-server and server-to-server connections. However, if your Messages server is logging chat messages, your messages are stored in an unencrypted format that can be easily viewed by your server administrator.

See also
Provide Messages service
Allow Messages buddies from other servers
Save message transcripts
About Messages service