Unable to forward email from specific folder and its subfolders in Kmail

All of a sudden, I am unable to forward mail from a specific set of folders in Kmail. The forwarding options are grayed out both in the message menu and the toolbar (the toolbar also grays out the next and previous icons). If I copy a message to a different folder, I can forward the email using the same identity and smtp server as is specified for the original folder. In the alternative folder no icons are grayed out, including next and previous, nor are the forwarding options grayed out in the message menu. This is a new behavior. Previously I had no problem forwarding emails from this folder. I am using kmail 5.23.3 (23.04.3) with KDE Frameworks 5.108.0 and Qt 5.15.10. Is this a new bug and can it be fixed?


Are the misbehaving folders local or, on an IMAP server or, on a POP3 server?

How does the following Akonadi check look?

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

You may have to execute the following:

> akonadictl vacuum

As a last resort we’ll have to delve into the intricacies of “akonadiconsole” but, before we do that, what I’ve sometimes had to do is –

  • Move the misbehaving e-Mails from the affected folder to a temporary folder and then, copy those e-Mails back to the original folder.
    Once everything is behaving as expected, one can either delete the misbehaving e-Mails in the temporary folder or, better, archive them.

Thanks. I ran the akonadictl fsck command and found 3925 items without RID. They are all in the same collection with consecutive item numbers. It also found 1 dirty item. I ran vacuum and then reran the fsck command with the same result. I don’t have specific misbehaving emails, but entire folders and subfolders. At least one of the subfolders has no emails, yet the same items are grayed out.

Then, either with “akonadiconsole” (the hard way – you’ll have to find the collection in the database … ) or, by simply creating a new temporary folder and then, moving all the misbehaving items to the new folder and then, copying them back to where they should be.

Once everything is as it should be, deal with the misbehaving items as you see fit.