Bug 287903 - Moving, removing and renaming of imap folders doesn't work correctly
Summary: Moving, removing and renaming of imap folders doesn't work correctly
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.7
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-30 12:18 UTC by Tamás Németh
Modified: 2013-11-18 16:04 UTC (History)
7 users (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 Tamás Németh 2011-11-30 12:18:33 UTC
Version:           4.7 (using KDE 4.7.2) 
OS:                Linux

I use kmail2 (version 4.7.2) with disconnected imap connections. I realized that it can well create folders, but folder moving, removing and renaming doesn't work. Folder removing is simply ineffectual, while moving and removing succedds, but kmail forgets(?) to unsubscribe from the old name, so the imap server remains subscribed to nonexistent folders.

Reproducible: Always

Steps to Reproduce:
1. Create a dimap account (connected imap may also suffer from these bugs, but I didnt try).
2. delete an imap folder
3. move an imap  folder
4. rename an imap folder

Actual Results:  
Deleting doesn't work at all, moing a renaming succeeds, but the old subscription remains in place.

Expected Results:  
(D)IMAP folder deletion, moving and renaming should entirely succeed.
Comment 1 Will Stephenson 2011-12-06 21:06:14 UTC
Did you check mail to force a server sync after the folder operations?
Comment 2 Tamás Németh 2011-12-09 19:59:02 UTC
(In reply to comment #1)
> Did you check mail to force a server sync after the folder operations?

Yes, but it didn't help at all :-(
Comment 3 Unknown 2013-01-23 10:03:00 UTC
Please, make a control with "akonadi console"
Choose "DB Browser", "collectiontable", "Refresh"
Get a look to the column "remoteId".
Are there any cell(s) with nothing? If yes, let me/us know by copying the raw(s).
Comment 4 Laurent Montel 2013-06-08 11:55:43 UTC
is it still valid in last version ?
Comment 5 Martin Koller 2013-11-17 14:39:52 UTC
In 4.11.3 it is still not possible to remove an empty folder.
I debugged and found that the problem is that RemoveCollectionRecursiveTask
does:
  // mark all items as deleted
  KIMAP::ImapSet allItems;
  allItems.add( KIMAP::ImapInterval( 1, 0 ) ); // means 1:*
  KIMAP::StoreJob *storeJob = new KIMAP::StoreJob( mSession );

and the server replies with an error 100:
"Store failed, server replied: A000005 BAD Error in IMAP command STORE: Invalid messageset "
Comment 6 Christian Mollekopf 2013-11-18 16:04:32 UTC
Git commit f35821bdf6ddaf731a312bb370ccbaf726963d78 by Christian Mollekopf.
Committed on 18/11/2013 at 16:04.
Pushed by cmollekopf into branch 'master'.

The store job can fail if the itemset is empty.

Since we're too lazy to check what's available, we simply ignore errors.
Any actually IMAP compliant server shouldn't require this step anyways.

M  +2    -1    resources/imap/removecollectionrecursivetask.cpp

http://commits.kde.org/kdepim-runtime/f35821bdf6ddaf731a312bb370ccbaf726963d78