KMail and Akonadi throwing thousands of errors

Ingo Klöcker kloecker at kde.org
Tue Sep 7 22:08:05 BST 2021


On Dienstag, 7. September 2021 21:50:39 CEST Bill Gee wrote:
> There are no messages in the outbox.  Both KMail and Thunderbird show that.

Okay. I suspected that it wouldn't be that easy.

> The outbox is in "Local Folders", which I think means that it is an MBOX
> store.

Actually, it's a maildir-like store, i.e. one file per email.

> When I do a directory on it, I get this:
> 
> [bgee at main2 ~]$ ll -Ra .local/share/local-mail/outbox/
> .local/share/local-mail/outbox/:
> total 20
> drwxr-xr-x  5 bgee bgee 4096 May 22 13:17 .
> drwxr-xr-x 12 bgee bgee 4096 May 23 14:00 ..
> drwxr-xr-x  2 bgee bgee 4096 Sep  2 13:47 cur
> drwxr-xr-x  2 bgee bgee 4096 Sep  3 05:54 new
> drwxr-xr-x  2 bgee bgee 4096 Sep  3 05:54 tmp
> 
> .local/share/local-mail/outbox/cur:
> total 8
> drwxr-xr-x 2 bgee bgee 4096 Sep  2 13:47 .
> drwxr-xr-x 5 bgee bgee 4096 May 22 13:17 ..
> 
> .local/share/local-mail/outbox/new:
> total 8
> drwxr-xr-x 2 bgee bgee 4096 Sep  3 05:54 .
> drwxr-xr-x 5 bgee bgee 4096 May 22 13:17 ..
> 
> .local/share/local-mail/outbox/tmp:
> total 8
> drwxr-xr-x 2 bgee bgee 4096 Sep  3 05:54 .
> drwxr-xr-x 5 bgee bgee 4096 May 22 13:17 ..

Okay. On filesystem-level the outbox folder is also empty. Then the ghost 
messages probably only exist in KMail's/Akonadi's database. Let's check.

Start akonadiconsole. You may have to install it first.

Select the DB Console tab. In the lower part enter
select * from collectiontable where name="outbox";
and then execute this query by clicking the button on the right.

In the upper part a table with a single row should be shown. Take note of the 
number in the first column named "id". That's the ID of the "collection" 
representing the outbox folder.

Now enter the following query in the lower part (removing the other query)
SELECT * FROM pimitemtable WHERE collectionId=<ID>;
where you replace <ID> with the ID from the result of the first query. Execute 
the query.

Does the query yield a result? If yes, do the IDs (in the first column) of the 
items in the result match the IDs in the error messages, i.e. 10411, 10412, 
10413, 10415, 10416, 10417, 10418, 10420, 10421, 10422, 10423?

If yes, then let's try to get rid of those entries in the database. Enter the 
following query in the lower part
DELETE FROM pimitemtable WHERE id=10411;
Double check that you have entered the correct ID. Then execute the query.
Did this work? If yes, continue with the other IDs from the error messages.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20210907/40b5bca7/attachment.sig>


More information about the kdepim-users mailing list