Version: 1.10.0 (using KDE 4.1.0) Installed from: SuSE RPMs Compiler: gcc 4.3.1 OS: Linux Occasionally KMail forgot all my accounts (but one) including all email stored in it (here: the one left over was pop3 and the lost ones all dimap accounts) when logging into KDE again after having logged out or restarted. I had a closer look at what happened when I logged out of KDE, so I think, I can explain why this is happening: When kmail closes it seems to want to save its config file (maybe only after changes to the configuration?). But for this to happen it needs an open wallet if passwords are stored. Now at KDE logout it might happen that KWalletManager/kwalletd gets closed before KMail (or the wallet is closed anyway). In that case a window with the password request to open the wallet appears. Since KDE is already shutting down, you'll probably not unlock the wallet, and kmail will get killed (by the logout process I guess - there is a window stating that kmail crashed but both windows (password request and crash report) close immediately). The first account was still in the config file, the rest wasn't - and KMail seems to clean up its caches at program start which is when they actually get lost. Possible solutions / fixes: - make config file (~/.kde4/share/config/kmailrc) saving independent from access to kwalletd - make KMail save its config file on changes only - and immediately! - don't overwrite the config file with an incomplete version - don't clean up email caches if the config file seems to be incomplete (if detectable) or do so in general
I should add that KMail seems to stop writing the config file the moment it tries to access the (inaccessible) KWallet. So not necessarily is the first account the only one left intact.
I have exactly the same problem using Kubuntu. So its not a problem with the suse-packages.
I have the same problem on my gentoo system. kmail just up and drop all accounts for no reason. I still haven't figure what is causing it and its a real pita to put back in all the accounts one at a time in kmail. Pasting the accounts back into the kmailrc file does not work.
*** This bug has been confirmed by popular vote. ***
(In reply to comment #3) > I still haven't figure what is causing it I did some testing and you can simulate the behaviour with the following: - start kontact (actually the bug does not appear with KMail! (i just found out)) - open "configure KMail" - change something in your mail account settings for receiving mails (doesn't have to be the password), e.g. "include in manual mail check" - click ok and ok again (closes configurations dialog) - close the kwallet - close KMail - it will ask for your KWallet password - don't enter it, hit "cancel" - kill KMail when it asks you whether to store passwords -> the result will be the broken config file ~/.kde4/share/config/kmailrc. So far account data hasn't been lost (~/.kde4/share/apps/kmail/) but when KMail is started again, it will delete all data it doesn't find accounts for. > its a real pita to put back in all the accounts one at a time in kmail. > Pasting the accounts back into the kmailrc file does not work. If you have a copy of your old configs (~/.kde4/share/config/kmailrc*), replacing it should work. Also restore a backup of the application's data directory (~/.kde4/share/apps/kmail/) and everything should be as it was. This Bug is still in KDE 4.1.3!! (I'll test whether this is also the case for KDE 4.2 beta2...)
I have the same problem since I use KDE4 on Mandriva 2009. Kmail waits some time for opening kwallet then it asks for all passwords all the time when Kmail is looking for new mails. Then after restarting kde to get the passworddialog for kwallet again and Kmail still is waiting for access I type the password for kwallet but all accounts are deleted. Only possiblitiy to solve the problem is restoring kmailrc from a backup. The problem would be not as bad if kmail would wait infinit for getting access to kwallet. I have the problem everytime i have to leave after starting the notebook and When I'm back I want to read mails and not to restart Kmail and save kmailrc from a backup.
I just upgraded to kmail 1.10.4 (kde4.1.4) and my distributed IMAP settings and mails were lost as well as the settings for my pop-account. The loss of settings has occurred several times in the last year. I have not figured out under what circumstances this happens. The messages at logout as refered by the first bug report author also happened to me. Very confusing. Losing email settings is intolearble. A suggestion would be to split the insanely long kmailrc into two parts. One with stable configuration info like accounts and one other?
as already suggested ("don't overwrite the config file with an incomplete version") I would propose the following quick fix: - when saving the config file, save it to a temporary file -> if that succeeds, copy the temporary file over the real config file that way we would only lose config file changes, not emails and email account settings - I know it wouldn't solve the problem but at least the bug would not be that severe!
Same problem here, even with kde 4.2. Every couple of weeks kmail loses all settings for my e-mail account. I think that it just happens when kwallet is not available bacause you don't type in the password within a certain time. But I'm not shure
*** Bug 170904 has been marked as a duplicate of this bug. ***
*** Bug 178598 has been marked as a duplicate of this bug. ***
*** Bug 171043 has been marked as a duplicate of this bug. ***
(In reply to comment #9) > Same problem here, even with kde 4.2. > Every couple of weeks kmail loses all settings for my e-mail account. > I think that it just happens when kwallet is not available bacause you don't > type in the password within a certain time. But I'm not shure > I agree with Sam, I only have the problem when I'm too late to type my password for kwallet. The most easy quick fix would be to remove any timeout for kwallet password typing.
I have the feeling that this bug has not come to the attention of KMail developers yet. Severity should be CRITICAL. This bug is a showstopper for any serious work with KDE 4.x (in fact one of the reasons why I am sticking with KUbuntu 8.04).
(In reply to comment #13) > The most easy quick fix would be to remove any timeout for kwallet > password typing. that wouldn't solve the problem when logging out (or using kshutdown to logout automatically)
SVN commit 913992 by tmcguire: Fix the bug that causes KMail to loose receiving accounts when KMail is exiting and wants to open the wallet, but is killed during that time (happens during logout). Now, the account config groups are saved after writing out the existing accounts, so this can't happen anymore. I also removed the feature to disable accounts, it was only a hidden feature and caused trouble with this. BUG: 169166 M +40 -59 accountmanager.cpp M +6 -10 accountmanager.h M +1 -2 kmkernel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=913992
SVN commit 913998 by tmcguire: Backport r913992 by tmcguire from trunk to the 4.2 branch: Fix the bug that causes KMail to loose receiving accounts when KMail is exiting and wants to open the wallet, but is killed during that time (happens during logout). Now, the account config groups are saved after writing out the existing accounts, so this can't happen anymore. I also removed the feature to disable accounts, it was only a hidden feature and caused trouble with this. CCBUG: 169166 CCMAIL: winter@kde.org M +40 -59 accountmanager.cpp M +6 -10 accountmanager.h M +1 -2 kmkernel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=913998
SVN commit 914005 by tmcguire: Backport r913992 by tmcguire from trunk to the 4.1 branch: Fix the bug that causes KMail to loose receiving accounts when KMail is exiting and wants to open the wallet, but is killed during that time (happens during logout). Now, the account config groups are saved after writing out the existing accounts, so this can't happen anymore. I also removed the feature to disable accounts, it was only a hidden feature and caused trouble with this. CCBUG: 169166 M +40 -60 accountmanager.cpp M +6 -10 accountmanager.h M +1 -2 kmkernel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=914005
*** Bug 172637 has been marked as a duplicate of this bug. ***
*** Bug 170812 has been marked as a duplicate of this bug. ***
*** Bug 117790 has been marked as a duplicate of this bug. ***
Thanks a lot for fixing this bug!