Unable to accept SSL certificate (k9mail) I am setting up k9mail on a 4.2 device (rooted Sony Xperia Mini Pro with stock ROM and crap removed) and it complains about the IMAP SSL certificate not being valid.

This happens with both a self-signed certificate, and also on a different IMAP server with Comodo-signed certificate (which is normally accepted by browsers and other mail clients).


  Unrecognized Certificate
  
  The server presented an invalid SSL certificate. Sometimes, this is
  because of server misconfiguration. Sometimes it is because someone is
  trying to atta you or your mail server. If you you're not sure what to
  do, click Reject and contact the folks who manage your mail server.
  
  (java.security.cert.CertPathValidatorException: Trust anchor for
  certification path not found.) Certificate chain[0]:
  
  ...


Clicking "Accept Key", however, make the same dialogue come up again and again in a loop.

What is the problem? Can it be that k9mail is unable to add the key to the cert store? How to debug this?
The problem was resolved by re-installing k9mail from scratch (the previous install, which exhibited the error, was from installed using Titanium Backup, from a backup on another phone).