Version: (using KDE 4.0.98) Installed from: Debian testing/unstable Packages With a fresh config, KMail asks for the account passwords (account config copied from former config). KWallet then comes up after KMail is closed. After that the KWallet appearance is quite erratic. Sometimes it doesn't show up and KMail asks for the password itself again. The next start KWallet asks to import those passwords to its database. and so on and so on...
I can reproduce the erratic behaviour you mention on r832242 (4.1 branch).
*** This bug has been marked as a duplicate of 163413 ***