Courier-Imap uses OpenSSL for https connections. To generate a CSR for Courier IMAP, follow the instructions for Apache or see the OpenSSL CSR manual below.
More information and documentation can be found at: Courier-IMAP.