After upgrading to openssl-0.9.7a-17 my imap connection via kmail stopped working (saying cannot connect to the server). Downgrading to openssl-0.9.7a-16 solves the problem. Tried it several times. FYI
When all is upgraded to krb5-1.3 than kmail imap is also working. Closing.