Remove the expired .pem file
rm /etc/courier/imapd.pem
Just open and check if the entries are recent (like contact email etc). This is NOT a mandatory step.
nano /etc/courier/imapd.cnf
Issue the following command to create new .pem file
mkimapdcert
Restart imap SSL service
/etc/init.d/courier-imap-ssl restart