I found more errors in my setup. So I reinstalled. It works now. I just have to fix my certificates for postfix and courier.
I found this for courier:
I restarted courier-imap, courier-imap-ssl, courier-authdaemon after making the new cert.
I want to change the CN to mail.domain.tld in order to awoid the warning from Thunderbird. When I run mkimapdcert it generates the new cert. But when thunderbird downloads the cert the CN is still localhost(as by default).
The issue is mentioned in this thread also: http://www.howtoforge.com/forums/showthread.php?t=1168