Hi everyone.
I don’t even know how to describe this.
Sometimes, after starting the computer, KMail doesn’t show a notification; it only displays the bell icon. When I open KMail and click on a message, it doesn’t get marked as read, and some folders appear empty. Everything returns to normal after restarting KMail. Could you please tell me what to check and where? Sorry for my English; this is a translation.
Thanks.
You may, possibly have to do some KMail housekeeping –
> akonadictl fsck
1/19 Looking for collections not belonging to a valid resource...
2/19 Checking collection tree consistency...
3/19 Looking for items not belonging to a valid collection...
Moved orphan items to collection 3242
4/19 Looking for item parts not belonging to a valid item...
Found 155803 orphan parts.
5/19 Looking for item flags not belonging to a valid item...
6/19 Looking for duplicate item flags...
Removed 0 duplicate item flags
7/19 Looking for duplicate mime types...
Removed 0 duplicate mime types
8/19 Looking for duplicate part types...
Removed 0 duplicate part types
9/19 Looking for duplicate tag types...
Removed 0 duplicate tag types
10/19 Looking for overlapping external parts...
11/19 Verifying external parts...
Found 3943 external files.
Found 3943 external parts.
Found no unreferenced external files.
12/19 Checking size threshold changes...
Found -1 parts to be moved to external files
Found -1 parts to be moved to database
13/19 Looking for dirty objects...
Collection "Search" (id: 1) has no RID.
Collection "Letzte Suche" (id: 3180) has no RID.
Collection "lost+found" (id: 3241) has no RID.
Collection "2026-09-22 19:26:37" (id: 3242) has no RID.
Found 4 collections without RID.
Found 0 items without RID.
Found 0 dirty items.
14/19 Looking for rid-duplicates not matching the content mime-type of the parent collection
.
.
15/19 Migrating parts to new cache hierarchy...
No external parts in legacy location, skipping migration
16/19 Making sure virtual search resource and collections exist
17/19 Looking for resources in the DB not matching a configured resource...
Found 1 orphan resources: akonadi_lost+found_resource
Removing resource akonadi_lost+found_resource
18/19 Checking search index consistency...
Skipping virtual Collection 1
Checking Collection 2 search index...
.
.
Collection 44 search index contains 1 orphan items. Scheduling reindexing
.
.
Skipping virtual Collection 3180
19/19 Flushing collection statistics memory cache...
Consistency check done.
>
Don’t bother to try a “vacuum” –
> akonadictl vacuum
Vacuum not supported for this database backend. (Sqlite backend)
>
Another possibility is the content held by Kontact/Kmail in the user’s ~/.cache/ directory –
You may have to clean out your Cache directory and, especially this directory →
> ls -dZ .cache/kontact/*
unconfined_u:object_r:cache_home_t:s0 .cache/kontact/messagelist
unconfined_u:object_r:cache_home_t:s0 .cache/kontact/qtpipelinecache-x86_64-little_endian-lp64
>
Could be to do with IMAP server. Have a read of this if you can translate it:
https://docs.kde.org/stable_kf6/en/kmail/kmail2/folders.html
Hope this helps but it seems overly complicated. Not sure about indicators if that is your main concern?
Thanks. Everything seems fine for now. I’ll keep an eye on it.
The “bell” is not a Kmail specific thing.
From what you describe, my educated guess is that it is not some database corruption, rather a race condition where akonadi starts too fast, i.e. before the database. If we’re talking about only IMAP ( which is pretty much the standard these days ) and CalDav / CardDav for kOrganizer / kAddressbook you could consider rebuilding the database by
akonadictl stop
mv ~/.local/share/akonadi ~/.local/share/akonadi.old
akonadictl start
Then wait and see if the kMail interface gets repopulated. If this does not work, repeat the steps, but rename akonadi to akonadi.new, akonadi.old to akonadi.
Another thing that could be the issue, is the folder ~/.local/share/akonadi/file_lost+foundcontaining a lot of small files which it hasn’t finished reading. To find out, stop akonadi, move that folder and restart akonadi, see if that helps.
@dcurtisfra Sqlite became the default db for akonadi not too long ago, the OP could be using MySQL ( or, like me Postgresql ). Just saying
Merci. It’s not always like that. It happens rarely—after a reboot or a fresh start. So far, everything is great.
That’s why I think it’s a race condition.
It’s happened again. The notification chime for a new email sounded, but the KMail envelope icon didn’t appear. I opened KMail from the system tray, and it isn’t marking the message as read. I’m sure that if I close KMail and reopen it, everything will be back to normal. Moving the database break the accounts?
Merci.
KMail now has 2 “Local Folders” folders.
I deleted one folder.
I renamed the database and restarted it.
KMail loaded all the emails. I’ll keep an eye on it.
That didn’t help. It’s the same thing again. The bell icon appeared, indicating new emails, but the envelope icon didn’t show up. (( Opening it from the system tray doesn’t show the new emails. However, if I exit KMail and open it again, everything is fine.
Switched to Driver=QMYSQL
Do you autostart kMail?
Or restore the session?
How do you connect to the internet? Wired of Wifi?
autostart kMail. Wifi.
Then change the WiFi settings, to “All users may connect” in the General Tab, and set the Pasphrase encryption to “Save password for all users (unencrypted)”. This will change the connection to root-owned and start it before the user login.
Edit, needs a reboot
It’s like that joke:
So, that’s it.
— Did you fix it?
— No, I broke everything.
Mine just won’t work properly with Gmail.
Which email client does everyone use?
Thunderbird might be a good option for you on KDE. Personally I use Evolution which is pretty good too, but that it a Gnome app so not sure how easy that would be to set up to work well with KDE.
I need it to check for and display new email (and Google Calendar events) and stay in the system tray. I’ve looked into it, and everyone says Thunderbird doesn’t minimize to the tray.
o minimize Thunderbird to the tray on KDE, you can use the “Close to tray” feature available in Thunderbird 154 and later, which allows the application to move to the system tray when closed instead of quitting. You can enable this feature in the settings under the General tab in the System Integration section.
TW ships Thunderbird ESR not Thunderbird R…