Re: KMail and Akonadi throwing thousands of errors

Bill Gee <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
Hi Ingo -

Thanks for the tips!  I did have to install akonadiconsole, but that 
took only a minute.  Running the two queries ...

 From the first query I got id=5.  I ran the second query like this:

	SELECT * FROM pimitemtable WHERE collectionId=5;

And got no results.  No rows were returned.

Thunderbird does not use Akonadi, but it does interact with the IMAP 
email account.  I wonder if Thunderbird cleaned up enough stuff so that 
Akonadi was able to get to a sane state.

I have rebooted the computer, so Akonadi has been restarted at least 
once since I copied the log messages.

In akonadiconsole, I looked in the Browser tab.  The IMAP account shows 
up there with a size of zero.  When I expand it, the various email 
folders appear.  Their size is not zero.  I spot-checked a couple of 
them, and the size they show does not match what Thunderbird shows. 
"Local Folders/Sent Mail", for example, shows 3 items, but Thunderbird 
shows none.  I suspect Akonadi is out of sync.

===============
Bill Gee

On 9/7/21 4:08 PM, Ingo Klöcker wrote:
> 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@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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.