Bug 1260416

Summary: [IMAPx] Move to real Trash keeps original message with UID COPY
Product: [Fedora] Fedora Reporter: Heiko Adams <bugzilla>
Component: evolutionAssignee: Milan Crha <mcrha>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 23CC: lucilanga, mbarnes, mcrha, pbrobinson, tpopela
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: evolution-data-server-3.17.92 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-07 16:40:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Logfile none

Description Heiko Adams 2015-09-06 15:32:09 UTC
Description of problem:
After updating evolution to 3.17.91 I noticed that evolution fails to delete mails from imap-accounts.

Version-Release number of selected component (if applicable):
$ rpm -qa evolution\*
evolution-3.17.91-1.fc23.x86_64
evolution-data-server-3.17.91-1.fc23.x86_64
evolution-help-3.17.91-1.fc23.noarch

How reproducible:
allways

Steps to Reproduce:
1. Delete a mail from an imap-account
2. Switch to anouther folder
3. switch back to the folder you deleted the mail from

Actual results:
The mail that should be deleted is still present

Expected results:
The mail should be deleted and no longer present

Additional info:

Comment 1 Milan Crha 2015-09-07 10:32:20 UTC
Thanks for a bug report. There had been done related changes for evolution-data-serer 3.17.92, namely commits named:
   [IMAPx] Junk/NotJunk message flags not stored server-side
   Bug 402843 - Remove Junk/Deleted flag when moving out of real Junk/Trash folder
   [IMAPx] Local changes not always properly saved to the server

The actual behaviour also depends on the account settings, whether you use real trash folder or not. I do not use the real trash folder and when I a delete message in it and move away from the folder, then when I return back to it the message stays deleted (View->Show Deleted messages is turned off).

The 3.17.92 will be released the next week, I guess we should figure out what's broken during this week. I'll create a test package for you, thus you could give it a try before the release.

Comment 2 Milan Crha 2015-09-07 11:49:49 UTC
The test build with changes since commit 5fc753eba55b is here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=10984647

Give it a try, please. As it is evolution-data-server, make sure all the evolution background processes will be restarted too, which you can also do either by reboot o re-login. Thanks in advance.

Comment 3 Heiko Adams 2015-09-07 12:02:29 UTC
The problem is still present after installing your test build and rebooting the system.

Comment 4 Milan Crha 2015-09-07 12:20:47 UTC
Thanks for a quick test. Could you run evolution from a terminal with this command:
   $ CAMEL_DEBUG=imapx:io,imapx:conman evolution
let evolution do its initial update, then, when the activity on the console will settle, mark the log place and reproduce the issue by deleting a message, move to another folder, move back, then copy the newly added output from the marked place on the console to some file and share it, please? The log may not contain any private information, but better to search it for anything obvious, like LOGIN, AUTH, pass and similar words. If you prefer, then feel free to send the log only to me, just reference this bug report in the Subject.

Comment 5 Heiko Adams 2015-09-07 12:31:48 UTC
Created attachment 1071015 [details]
Logfile

I hope I made anything correct and this helps you

Comment 6 Milan Crha 2015-09-07 14:56:18 UTC
I see in the log that you've setup a real Trash folder on the account, the Inbox/Trash. You deleted one message in the Inbox, which got saved as a message copy into the Inbox/Trash folder, then a call of Expunge in the Inbox itself. The Expunge didn't delete anything in the Inbox, because there is missing a flag change save.

I'm pretty sure I fixed this recently, I recall the issue with the real Junk/Trash folder, but your log says the opposite. I checked the log with my Dovecot server and I see the difference, my server uses "UID MOVE", while yours "UID COPY". That means that the "UID COPY" lefts the message in the source folder, while the "UID MOVE" really moves it, thus it disappears from the source folder and is in the destination only. Avoiding the "UID MOVE" helps me reproduce the issue here. Thus I'm confirming it.

Comment 7 Milan Crha 2015-09-07 16:40:39 UTC
I fixed this upstream with commit [1]. It will be included in evolution-data-server 3.17.92. I also created another test build for you at [2].

Thanks for your help with this.

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=73d0803
[2] http://koji.fedoraproject.org/koji/taskinfo?taskID=10987464

Comment 8 Milan Crha 2015-09-10 12:02:08 UTC
*** Bug 1261865 has been marked as a duplicate of this bug. ***