Courier mail server and SSL error SSL3_GET_RECORD:wrong version number

Just realized that some of the incoming mails where bouncing, meaning that the other mailserver wasn’t able to connect at all.

This concerned all all mailservers starting a STARTTLS SMPT connection. In the logs the “SSL routines:SSL3_GET_RECORD:wrong version number” occured.

It turned out to be a configuration problem of courier. In the default install TLS_PROTOCOL is set to TLS1. The problem dissapears when setting it to SSL23 instead.