It works only without encryption, if I set SSL/TLS port 993 plain enter in loop and if I delete account via Kmail a window asking for the imap password is shown for a fraction of a second, when I have created the account I entered the correct password and allowed its saving in the wallet.