This issue arose because the password for the email service was reset, and when setting the new password in KMail, an “Error: No authentication” message appeared.
KMail should actually use the KDE Wallet password manager, and everything is set up accordingly in the KDE settings, yet KMail refuses to save the password in the settings (Inbox). You can enter the correct password and click OK in the KMail settings, and the Inbox shows that it is ready. However, if you check again by editing the Inbox settings, you will see that the old password is still there (seen by the number of reduced password dots). If you close KMail and reopen it, the IMAP error ‘NO authentication’ appears.
In the email sending settings, however, the password is saved correctly.
I have tried and checked various things:
- in the KDE settings, programmes are allowed to use the KDE Wallet
- in the KMail settings, you can enter the correct password, but it is not saved somehow; when “saved”, then OK and checking for new mails (Nachrichten aktualisieren/Refresh messages) it is more or less quiet, eventually the error appears.
aconadictl restart whilst KMail was running did not solve the problem
- Strangely, in the incoming mail settings, KMail allows you to check for server-side subscriptions, and it does something and shows no errors, even though you have just entered the correct password. After pressing OK and returning to the incoming mail settings, the old password is there again.
I’m not sure whether KMail uses the KDE Wallet as a password store at all. Sometimes the wallet password is requested, but sometimes it isn’t, and when you check, it sometimes shows that the wallet (KDE Wallet) is closed whilst KMail is running; I then unlocked it, but the KMail IMAP error persists. In the wallet, under the ‘Applications’ tab, I would have expected KMail to appear,
but there is often no entry for KMail. Sometimes it takes a while and then an entry called akonadi_resource-something appears in the ‘Applications’ tab of the KDE Wallet.
How can I ensure that the IMAP password is saved correctly in the KDE Wallet? Right now the KDE Wallet is open, but the password gets not saved somehow.
KMail definitely uses KWallet.
> ls -aldZ $XDG_DATA_HOME/kwalletd
drwx------. 2 xxx xxx unconfined_u:object_r:data_home_t:s0 155 25. Apr 18:01 /home/xxx/.local/share/kwalletd
>
> ls -aldZ $XDG_DATA_HOME/kwalletd/*
-rw-------. 1 xxx xxx unconfined_u:object_r:data_home_t:s0 7431 21. Apr 16:09 /home/xxx/.local/share/kwalletd/kdewallet_attributes.json
-rw-------. 1 xxx xxx unconfined_u:object_r:data_home_t:s0 2660 25. Apr 18:01 /home/xxx/.local/share/kwalletd/kdewallet.kwl
-rw-------. 1 xxx xxx unconfined_u:object_r:data_home_t:s0 56 3. Jan 14:07 /home/xxx/.local/share/kwalletd/kdewallet.salt
>
If you’ve enabled SELinux then, you’ll need to ensure that the security contexts have been correctly set for concerned user’s XDG_DATA_HOME directory tree:
# restorecon -F -R -v ~UserName/.local/share
You may have to set an empty password on “kdewallet” password Wallet.
For the case of KMail, in the “kdewallet” password Wallet there should be at least the following directories –
Right, thanks, that would be a way to go in the wallet itself.
Strangely enough, there were a lot of issues with the KDE Wallet; sometimes the wallet wouldn’t open.
However, after shutting down and restarting the system, I was prompted for the KDE Wallet password, entered it correctly, and KMail started working properly again. The password was indeed the correct one, even though no password changes had been made in the meantime, nor had any attempts been made to reset the password in KMail.
Some sort of wallet is being used. In theory, the set default wallet should be open, but upon checking in the KDE Wallet Manager, it appeared to be closed (the ‘Open…’ button was visible), we didn’t check whether it could be opened, as it was working again for the time being (never touch a running system
…), and there had also been opening problems previously where the wallet wouldn’t accept the correct password and then froze.
@Infinite_Dao:
If the “kdewallet” password Wallet shall be opened automatically at login, the Wallet’s password has to be the same as the user’s login password.
- At least that’s the documented method but, currently with SELinux activated there seems to be some issues with this method …
And, I’ve now re-read the ArchLinux KDE Wallet Wiki – there are some recent changes which currently do not seem to be reflected in the openSUSE PAM settings – at least those here on Tumbleweed – <https://wiki.archlinux.org/title/KDE_Wallet>