Summary: | Kmail does not display IMAP accounts and Maildir folders in Folder views unless they contain a folder with unread messages | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | whatifgodwasoneofus |
Component: | Maildir Resource | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | REPORTED --- | ||
Severity: | critical | CC: | carl, oleksandr, whatifgodwasoneofus |
Priority: | NOR | ||
Version: | 6.2.0 | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
whatifgodwasoneofus
2024-08-26 19:45:10 UTC
Further info: I think the issue is in Akonadi and not necessarily in kmail (or at least _also_ in akonadi). The folders that "disappear" (the ones "grayed out" in the DB Browser) are missing the "inode/directory" and "message/rfc822" content types in the "internals" tab of the "Folder properties" window. However, if I look inside the DB, there indeed are records in the join table "collectionmimetyperelation": I don't know why the DB Browser doesn't show them. If I add (manually) those mime types in the "Folder properties" window, then the folders are not grayed out anymore and they do appear in KMail - but as soon as the Akonadi indexer "touches" them, they disappear again and become grayed out in the DB Browser and "loose" the mime types associations. And, again, the "collectionmimetyperelation" table still contains the related records! I "fixed" the issue by removing the maildir folders from the disk, so that when Akonadi restarts it re-creates them as empty dirs. Then, I have rsync'ed them from a backup one-by-one, and so far it seems that everything stays there as it should. It will take at least another hour for the indexer to complete, then I'll know if some folders keep disappearing or not. Further info: About the IMAP accounts: they behave like the folders of the Maildir resources (they get grayed out in DB Browser) Further Info: I am NOT able to fix this issue permanently. Whenever I manage to have akonadi "rescan" the maildir (or the IMAP folders), they appear in Kmail and they are not greyed out anymore in the Akonadi console. But when akonadi restarts (either because it crashes & restarts itself, or because I restart it with `akonadi restart`), those folders are greyed out again and kmail cannot see them anymore. I can make a new message appear in the folders, either in maildirs (by creating a new msg or by just `touch`ing an existing one) or in IMAP accounts (by manipulating the folders from another mail client), and then force a folder rescan, but this is not a viable solution! Another workaround I found is to fiddle directly with the DB: ``` update collectiontable set remoterevision = NULL where id in (list of affected collection ids) ; ``` and then request a rescan. This is faster, but hey... it's not viable. It seems that akonadi is not able to persist the "correct" status in the DB, I have no idea how to investigate further. I tried both with mariadb and with postgresql backends: the behaviour is consistent. I have also tried with removing the search_db folder and also the whole .local/share/akonadi folder: the behaviour persists. At this point I think it's a bug... It is reproducible at each & every clean start, with any backend! Could someone help?! |