Bug 462829 - "New Subfolder" option under filter rules, does not upload the new imap-folder to the server. Filter keep on producing duplicate emails.
Summary: "New Subfolder" option under filter rules, does not upload the new imap-folde...
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: 5.21.3
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-09 19:45 UTC by Amund Sjaavaag
Modified: 2023-03-28 13:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amund Sjaavaag 2022-12-09 19:45:10 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Right clik on an e-mail in any folder, Create Filter, Filter on From, Filter action: Move into Folder.
2. Choose any imap-folder, and click on New Subfolder.  The Subfolder you create, become innvisibel in this dialog.
3. Go back to the filter action. Here you find the new subfolder. Choose it as destination for Move into Folder.

OBSERVED RESULT
The New Subfolder of the imap folder, does not appear on the server.
The filters put hundreds or thousends of duplicate emails a day in each local ghost folder.

EXPECTED RESULT
To oppload the New subfolder of the imap folder, to the server.
Not make duplicate emails

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Amund Sjaavaag 2022-12-12 18:55:11 UTC
SUMMARY
When attempting to create a new imap folder,  with the the "New Subfolder" function under filter rules,  a new folder is created, but it is visible only by kmail. The new folder is not created on the server.  This is not consistent: The parent folder is a real imap-folder,  but the new subfolder is in fact just a local folder, and its emails are just stored local.
When the filters move emails to the new Subfolder, the filters keep on putting duplicate emails in the subfolder.

Confusing situation:
Later attempts to move emails from this fake subfolder to real  imap folders, makes a lot of emails under imapfolder, that is just stored local.
This makes a confusing situation, when kmail has a lot of subfolders and emails under imap folders, but from the user interface, you can't see which of the emails, and wich folders are stored on the server, and wich are just local. This is a confusing situation, because a big number of duplicate emails are created, and when you delete thousends of duplicate, you never know if you delete local duplicate or the real imap emails, and i have found no workaround to rescue emails that are just saved local.
Comment 2 Laurent Montel 2023-01-04 07:07:05 UTC
Hi,
Do you have an error message ? as here I can create a subfolder. Perhaps it uses some specific characters not supporting by your imap folder.
Do you success to create subfolder in kmail directly ?
Comment 3 Amund Sjaavaag 2023-03-28 13:24:50 UTC
(In reply to Laurent Montel from comment #2)
> Hi,
> Do you have an error message ? as here I can create a subfolder. Perhaps it
> uses some specific characters not supporting by your imap folder.
> Do you success to create subfolder in kmail directly ?

Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 14:57:16 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 14:57:16 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
(In reply to Laurent Montel from comment #2)
> Hi,
> Do you have an error message ? as here I can create a subfolder. Perhaps it
> uses some specific characters not supporting by your imap folder.
> Do you success to create subfolder in kmail directly ?

(In reply to Laurent Montel from comment #2)
> Hi,
> Do you have an error message ? as here I can create a subfolder. Perhaps it
> uses some specific characters not supporting by your imap folder.
> Do you success to create subfolder in kmail directly ?

There are some folder names containing characters like -_ or space, but i don't find any way to rename the folders.

Error messages:
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Mar 27 16:58:39 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: Error while handling command FetchCollections on connection akonadi_imap_resource_5 (0x558b7adef760)
Mar 27 16:58:39 localhost.localdomain akonadi_imap_resource[16925]: org.kde.pim.akonadiagentbase: Failed to fetch collection for collection sync:  "Collection does not exist"
Comment 4 Amund Sjaavaag 2023-03-28 13:30:29 UTC
Mar 27 18:48:41 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver: DATABASE ERROR:
Mar 27 18:48:41 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver:   Error code: "1062"
Mar 27 18:48:41 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver:   DB error:  "Duplicate entry '204-INBOX' for key 'CollectionTable_parentAndNameIndex'"
Mar 27 18:48:41 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver:   Error text: "Duplicate entry '204-INBOX' for key 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
Mar 27 18:48:41 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver:   Values: QMap((":0", QVariant(QString, "/INBOX"))(":1", QVariant(QString, ""))(":10", QVariant(int, -1))(":11", QVariant(int, -1))(":12", QVariant(bool, false>
Mar 27 18:48:41 localhost.localdomain akonadiserver[13768]: org.kde.pim.akonadiserver:   Query: "INSERT INTO CollectionTable (remoteId, remoteRevision, name, parentId, resourceId, enabled, syncPref, displayPref, indexPref, cachePolicyInherit, cac>
Comment 5 Amund Sjaavaag 2023-03-28 13:41:45 UTC
The name of the root folder on the Imap account, is "Inbox". 
akonadiserver had a database error regarding "/INBOX"