KMail Receive resources hosed

The receive resources in KMail on my laptop have mysteriously been hosed. The actual accounts have disappeared and been replaced with entries such as “Maildir” which can be opened and points to the actual mail directory and others labeled Pop3 Server, which cannot be opened. It is also impossible to add a new entry. Oddly enough, the send resource is still there. Is there some way to reset everything? If I remember correctly, there is a way to rebuild the akonadi database. I’m not sure that that is the issue, but something has been corrupted. I’m running KMail 5.24.4 (23.08.4) on Framework 5.115.0 and QT 5.15.12. I don’t think it is the software as I am running this on another computer and it works just fine.

This is a laptop which I use for traveling, so I don’t mind that much reconstructing the accounts, but I need to get it working.

Update: I erased the contents of the ~/.local/share/akonadi directory. Now KMail won’t even start with the error message “Can’t fetch resources” which appear to be the “Pop 3 Server” resources. Not only that my calendar has disappeared from KOrganizer and it won’t add it back.

I’m not using KDE or Kmail but I can offer a suggestion to avoid these issues in the future.
Enable snapshots for the home subvolume (you should have one with the default subvolume layout):

sudo snapper -c home create-config /home

# optionally modify the config for when the timeline snaps should be taken/retained
sudo nano /etc/snapper/configs/home

# wait for the timeline snaps to be created and view them
sudo snapper -c home list

You can then restore files/directories going back days/weeks/months from /home/.snapshots

I do daily backups of my other computer to a cloud service that stores them for months. Unfortunately not for the laptop…

Snapshots are free and don’t take up much of your space.
They also cleanup after themselves (snapper-timeline.timer) :wink:

Good for restoring due to some mistake.
Not good for restoring when the disk is dead! You would still need backups for that.

Re-installing the package should get you back those directories in home.
It would also most likely require you to re-setup the app, assuming you clear out any remaining remnants from cache, config, etc. for a clean slate (recommended).

sudo zypper in --force <package-name>

@bearymore:

Here on this system:

Operating System: openSUSE Leap 15.5
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 5.14.21-150500.55.49-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 5 3400G with Radeon Vega Graphics
Memory: 29.3 GiB of RAM
Graphics Processor: AMD Radeon Vega 11 Graphics
Manufacturer: ASUS

and, 2.5 GiB of e-Mails in my Local directory plus, 8 IMAP accounts with my ISP.

KMail 5.22.3 (22.12.3)
Kontact Version 5.22.3 (22.12.3)
  1. Don’t play about with the Akonadi directory:
 > ls -A akonadi/
Akonadi.error      db_data  file_db_data     mysql.conf  socket-xxx-default
Akonadi.error.old  db_misc  file_lost+found  search_db
 >
  1. Occasionally, execute this:

> akonadictl fsck 2>&1 | grep -iE 'found|no RID'

  1. Your local Contacts are stored in:

~/.local/share/apps/korganizer/

  1. Regularly archive your e-Mail Folders to a local safe disk.

  2. Use “akonadiconsole” to investigate the issues raised by “akonadictl fsck” …

  3. Don’t panic … :smiling_imp:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.