Bug 309226 - Selecting an Exchange "Deleted Items" folder results in error
Summary: Selecting an Exchange "Deleted Items" folder results in error
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: GIT (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-29 22:55 UTC by Thiago Macieira
Modified: 2014-02-26 08:08 UTC (History)
3 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 Thiago Macieira 2012-10-29 22:55:16 UTC
Whenever I select the Deleted Items folder from my Exchange server, Akonadi gets an unhandled error. This particular folder has auto-deletion enabled. When I select this folder, the following happens:

a) the job tracker shows "Unable to fetch item from backend (collection 85, resource -1)"

b) akonadiconsole or kmail prints that error:
akonadiconsole(63706)/libakonadi Akonadi::EntityTreeModelPrivate::fetchJobDone: Job error:  "Unable to fetch item from backend (collection 85, resource -1)" for collection: 85 

c) .xsession-error logs the following (I don't know which program is the source; it's not the IMAP agent):
ItemRetrieverException :  Unable to retrieve item from resource: <html>Invalid item retrieved</html>
ItemRetrieverException :  Unable to retrieve item from resource: <html>Invalid item retrieved</html>

The IMAP conversation was:

C: A000004 SELECT "Deleted Items"
S: * 39 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 2  ]
S: * OK UIDVALIDITY value [ UIDVALIDITY 11585  ]
S: * OK The next unique identifier value [ UIDNEXT 3641  ]
S: A000004 OK SELECT completed. [ READ-WRITE  ]
C: A000005 UID FETCH 3296 (BODY.PEEK[] UID)
S: A000005 OK FETCH completed.


Reproducible: Always

Steps to Reproduce:
1. Select "Deleted Items" folder

Actual Results:  
Distraction icon spins forever. No email is displayed.

Expected Results:  
Contents of folder should be displayed.

The Deleted Items folder in Exchange contains emails that have been deleted from the server, but can be retrieved by undeleting. That is, it contains a two-stage deletion process.

I believe Akonadi is choking on the deleted-but-undeletable emails. By issuing IMAP commands directly to the Exchange server, I see:


1 UID FETCH 3296 (FULL)
* 21 FETCH (FLAGS (\Seen) INTERNALDATE "27-Sep-2012 02:20:15 -0700" RFC822.SIZE 4454 ENVELOPE (NIL "Retrieval using the IMAP4 protocol failed for the following message: 3296" (("Microsoft Exchange Server 2010" NIL NIL ".MISSING-HOST-NAME.")) NIL NIL (("Macieira, Thiago" NIL "thiago.macieira" "intel.com")) NIL NIL NIL NIL) BODY ("text" "plain" ("charset" "us-ascii") NIL NIL "quoted-printable" 1 1) UID 3296)
1 OK FETCH completed.
Comment 1 Kevin Ottens 2013-11-16 07:27:17 UTC
The IMAP resource has a new maintainer, reassigning to him.
Comment 2 Christian Mollekopf 2014-02-20 16:32:20 UTC
Does this still apply to kdepim >= 4.11.3?
Comment 3 Thiago Macieira 2014-02-20 16:51:41 UTC
(In reply to comment #2)
> Does this still apply to kdepim >= 4.11.3?

Didn't happen today. I will post again in a couple of days when some more emails are expired by the server.
Comment 4 Thiago Macieira 2014-02-26 08:08:52 UTC
It's apparently working now.