right, that was the mistake.
For people having the same problem:
I edited the files /etc/courier/imapd.cnf and /etc/courier/pop3d.cnf; there you can change the data used for creating certificates.
Then I went to /usr/share/courier-imap, where I deleted the files imapd.pem and pop3d.pem (these are the old certificate files). I executed mkimapdcert and mkpop3dcert; these executables create the new certificates.