Kmail does not sand e-mails

Hello!
I’m having trouble sending emails using Kmail after upgrade to fedora 40 with KDE 6.
I got message “The mail dispatcher is offline, so mails cannot be sent. Do you want to make it online?” After click “set online” message goes to outbox. If i try send queued message i always got same error: “The mail dispatcher is offline, so mails cannot be sent. Do you want to make it online?”
In akonadiconsole i see mail dispatcher in status offline. I tried to swith it online\restart\abort. Nothing happens. No errors.

Try this see if it helps: From a terminal type

akonadictl restart

and hit [Enter].

This will restart akonadi, the engine working in the background for KMail. Wait a minute or so for the restart to do its thing and then you can close the terminal. Don’t worry if it is still printing messages to the command line: the akonadi restart is very verbose and most of the output will not be useful to you.

Try sending your message again.

Thanks for the answer. I already tried it many times. Unsuccessfully. A colleague just confirmed that he had the same problem after the update.

What distribution are you using? Maybe we can find out if there is a bug there.

The distribution is fedora 40. There are no problems with fedora 39(KDE5). But after upgrading to fedora 40(KDE6) this problem occurred.

@Vladimir_G:

First – Welcome to the KDE Plasma Forums!


Shutdown (Quit) KMail – check that, all KMail and Akonadi processes have been killed.

 > akonadictl stop
 > ps -u «Your Username»

Then, restart KMail – Akonadi should restart …
Then,

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

Please note the single quotation marks …

Inspect the fsck output for any unusual errors – the following “has no RID” messages are normal –

Collection "Search" (id: 1) has no RID.
Collection "OpenInvitations" (id: 96) has no RID.
Collection "DeclinedInvitations" (id: 97) has no RID.
Collection "Letzte Suche" (id: 832) has no RID.

Thank you Franken14679!

did it

Output is following:

Found 16817 external files.
Found 16817 external parts.
Found no unreferenced external files.
Found 0 parts to be moved to external files
Found 0 parts to be moved to database
Collection “Search” (id: 1) has no RID.
Collection “Last Search” (id: 35) has no RID.
Found 2 collections without RID.
Item “519664” in collection “512” has no RID.
Item “519667” in collection “512” has no RID.
Item “519668” in collection “512” has no RID.
Item “519669” in collection “512” has no RID.
Item “519670” in collection “512” has no RID.
Item “519671” in collection “512” has no RID.
Item “519673” in collection “512” has no RID.
Item “522658” in collection “468” has no RID.
Item “522664” in collection “468” has no RID.
Item “522670” in collection “512” has no RID.
Item “522718” in collection “512” has no RID.
Item “522728” in collection “468” has no RID.
Item “522734” in collection “468” has no RID.
Item “522750” in collection “468” has no RID.
Item “522753” in collection “513” has no RID.
Item “522756” in collection “512” has no RID.
Item “522771” in collection “512” has no RID.
Item “522775” in collection “512” has no RID.
Item “522777” in collection “512” has no RID.
Item “522778” in collection “512” has no RID.
Item “522779” in collection “512” has no RID.
Item “522780” in collection “513” has no RID.
Item “522782” in collection “513” has no RID.
Item “522786” in collection “512” has no RID.
Item “522789” in collection “513” has no RID.
Item “522791” in collection “513” has no RID.
Item “522792” in collection “513” has no RID.
Found 27 items without RID.
Found 0 dirty items.

@Vladimir_G:

Then you have a few Akonadi database issues –

Item “519664” in collection “512” has no RID.
Item “519667” in collection “512” has no RID.
Item “519668” in collection “512” has no RID.
Item “519669” in collection “512” has no RID.
Item “519670” in collection “512” has no RID.
Item “519671” in collection “512” has no RID.
Item “519673” in collection “512” has no RID.
Item “522658” in collection “468” has no RID.
Item “522664” in collection “468” has no RID.
Item “522670” in collection “512” has no RID.
Item “522718” in collection “512” has no RID.
Item “522728” in collection “468” has no RID.
Item “522734” in collection “468” has no RID.
Item “522750” in collection “468” has no RID.
Item “522753” in collection “513” has no RID.
Item “522756” in collection “512” has no RID.
Item “522771” in collection “512” has no RID.
Item “522775” in collection “512” has no RID.
Item “522777” in collection “512” has no RID.
Item “522778” in collection “512” has no RID.
Item “522779” in collection “512” has no RID.
Item “522780” in collection “513” has no RID.
Item “522782” in collection “513” has no RID.
Item “522786” in collection “512” has no RID.
Item “522789” in collection “513” has no RID.
Item “522791” in collection “513” has no RID.
Item “522792” in collection “513” has no RID.
Found 27 items without RID.

You’ve already performed an “fsck” on the database – you should then try –

> akonadictl vacuum

Followed by another “fsck”.


If that doesn’t help then, it’ll be more difficult –

  • To work out which collections are involved, you’ll have to use “akonadiconsole” – you usually have to install the “akonadiconsole” package …

Once you’ve found the collections involved, you can inspect those collections to determine which items do not have a RID assigned to them.

  • A “RID” is an internal database item.

I usually deal with this issue by moving the affected items to the Waste-bin/Trash folder (I delete the items … ) and then copying them back to the folder where they should be located – a new RID is created and everything is fine – after the Waste-bin has been emptied …

I’m sorry. I’ve been away from the computer for the past few days.
The vacuum didn’t help me. I found the elements without RID using akonadiconsole and deleted them.
The fsck output now looks like this:

Found 16933 external files.
Found 16933 external parts.
Found no unreferenced external files.
Found 0 parts to be moved to external files
Found 0 parts to be moved to database
Collection “Search” (id: 1) has no RID.
Collection “Last Search” (id: 35) has no RID.
Found 2 collections without RID.
Found 0 items without RID.
Found 0 dirty items.

But I still can’t send messages. Maildispatcher is still offline.

@Vladimir_G:

A very stupid question from me –

  • Menu “File” → about half way down the list of functions → “Work Online
    «or, “Work Offline” if online … »

<Chapter 5. Command and Menu Reference → File Menu>

It is online. I can receive messages, but not send.