[Bug 259151] New: Moving/copying messages to folders causes redownload of the entire folder [Exchange server]

Thiago Macieira thiago at kde.org
Tue Dec 7 17:48:10 GMT 2010


https://bugs.kde.org/show_bug.cgi?id=259151

           Summary: Moving/copying messages to folders causes redownload
                    of the entire folder [Exchange server]
           Product: Akonadi
           Version: 1.4.80
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: IMAP resource
        AssignedTo: ervin at kde.org
        ReportedBy: thiago at kde.org
                CC: vkrause at kde.org, kdepim-bugs at kde.org


Version:           1.4.80 (using Devel) 
OS:                Linux

If I copy or move an email to a different folder from KMail2 on my Exchange
2010 server (no UIDPLUS support), the IMAP resource proceeds to redownload
everything in that folder. There appears to be some faulty logic in
kdepim/runtime/resources/imap/retrieveitemstask.cpp in
RetrieveItemsTask::onFinalSelectDone.

If I apply the following patch to that file:
-    kDebug(5327) << "UIDNEXT check failed, refetching mailbox";
+    kDebug(5327) << "UIDNEXT check failed (old UIDNEXT =" << oldNextUid
+                 << "but current UIDNEXT =" << nextUid << "), refetching
mailbox";

I see in my debug output:

akonadi_imap_resource_0(12064)/kdepimlibs (kimap)
RetrieveItemsTask::onFinalSelectDone: UIDNEXT check failed (old UIDNEXT = 3012
but current UIDNEXT = 3013 ), refetching mailbox

The commands conversation with the server that was logged, relating to that
mailbox is:

[last SELECT before the copy]
C: A000727 SELECT "INBOX/~done/_other"
S: * 2762 EXISTS
S: * 0 RECENT
S: * FLAGS ( \Seen \Answered \Flagged \Deleted \Draft $MDNSent )
S: * OK Permanent flags [ PERMANENTFLAGS ( \Seen \Answered \Flagged \Deleted
\Draft $MDNSent )  ]
S: * OK Is the first unseen message [ UNSEEN 2762  ]
S: * OK UIDVALIDITY value [ UIDVALIDITY 969  ]
S: * OK The next unique identifier value [ UIDNEXT 3012  ]
S: A000727 OK SELECT completed. [ READ-WRITE  ]

[the copy]
C: A000008 UID COPY 30037 "INBOX/~done/_other"
S: A000008 OK COPY completed.
C: A000009 UID STORE 30037 +FLAGS (\Deleted)
S: * 7 FETCH ( FLAGS (\Seen \Deleted) )
S: A000009 OK STORE completed.
C: A000010 SELECT "INBOX/~done/_other"
S: * 2763 EXISTS
S: * 1 RECENT
S: * FLAGS ( \Seen \Answered \Flagged \Deleted \Draft $MDNSent )
S: * OK Permanent flags [ PERMANENTFLAGS ( \Seen \Answered \Flagged \Deleted
\Draft $MDNSent )  ]
S: * OK Is the first unseen message [ UNSEEN 2762  ]
S: * OK UIDVALIDITY value [ UIDVALIDITY 969  ]
S: * OK The next unique identifier value [ UIDNEXT 3013  ]
S: A000010 OK SELECT completed. [ READ-WRITE  ]
C: A000011 UID SEARCH HEADER Message-ID
<2D4CD7082D79B34AACB04EE0C7414656180A2B8040 at NOK-EUMSG-03.mgdnok.nokia.com>
S: * SEARCH 3012
S: A000011 OK SEARCH completed.

[when syncing, just after the copy]
C: A000130 SELECT "INBOX/~done/_other"
S: * 2763 EXISTS
S: * 0 RECENT
S: * FLAGS ( \Seen \Answered \Flagged \Deleted \Draft $MDNSent )
S: * OK Permanent flags [ PERMANENTFLAGS ( \Seen \Answered \Flagged \Deleted
\Draft $MDNSent )  ]
S: * OK Is the first unseen message [ UNSEEN 2762  ]
S: * OK UIDVALIDITY value [ UIDVALIDITY 969  ]
S: * OK The next unique identifier value [ UIDNEXT 3013  ]
S: A000130 OK SELECT completed. [ READ-WRITE  ]
C: A000131 EXPUNGE
S: A000131 OK EXPUNGE completed.
C: A000132 SELECT "INBOX/~done/_other"
S: * 2763 EXISTS
S: * 0 RECENT
S: * FLAGS ( \Seen \Answered \Flagged \Deleted \Draft $MDNSent )
S: * OK Permanent flags [ PERMANENTFLAGS ( \Seen \Answered \Flagged \Deleted
\Draft $MDNSent )  ]
S: * OK Is the first unseen message [ UNSEEN 2762  ]
S: * OK UIDVALIDITY value [ UIDVALIDITY 969  ]
S: * OK The next unique identifier value [ UIDNEXT 3013  ]
S: A000132 OK SELECT completed. [ READ-WRITE  ]

It's during the last section that the debug message is printed.

Reproducible: Always




$ akonadiserver --version
Akonadi 1.4.80 (revision: d0502b1)
kdepim revision 1204307
OS: Linux (i686) release 2.6.35.2-server-1mnb
Compiler: gcc

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Kdepim-bugs mailing list