Summary: | Moving an email to a collection without remote ID keeps copy in old collection | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Richard Bos <richard.bos> |
Component: | Maildir Resource | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | quazgar, simonandric5, sknauss |
Priority: | NOR | ||
Version: | GIT (master) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Richard Bos
2015-12-26 16:16:32 UTC
I can confirm this behaviour, both on 4.14.8 and 4.14.10 (Akonadi 1.13.0), at least for one user on my machine. I tried to reproduce it for a test user but so far could not see this bug there. Additional observations: - It does not seem to be a matter of downloading the message again (although I did not test with network switched off), but the "seenUidList=..." entry in the [LeaveOnServer] section in ~/.kde4/share/config/akonadi_pop3_resource_0rc is not modified by moving the mail. - The Mail is moved correctly to the new folder, at least according to the browser in AkonadiConsole. The "reappearing" mails in the inbox get new and unique IDs though, although the "Remote Id" stays the same (still according to AkonadiConsole). - In accordance with this finding, there still is an email file (with filename-remote id) in the inbox folder (in the filesystem), even after moving the mail and _before_ the mail reappears in KMail's display. Interestingly, the _target_ mail directory does not have a file system representation, maybe because it's small enough to be completely buffered in Akonadi? I will test if this factor discriminates if the bug occurs. Indeed! When moving the mail to a folder for which a file system representation exists (e.g. ~/.local/share/local-mail/Personen/ on my machine): 1) The mail file (my test case: "1452111445.R691.droggelbecher:2,S") is moved correctly to the new location, disappearing from the original file system folder. 2) The mail does not reappear upon revisiting the inbox. For me personnally ( original poster ) the problem has been solved in the meantime. But this took a lot of effort. Too much to describe what I did. But it basically boils down that I removed the pop account and started from scratch, but whether that actually is the only thing that's need, I don't know. For me this report can be closed ( although it would be better to have the real problem solved ). I had now a gdb session with Daniel and we could found the base problem, that gentBasePrivate::itemMoved is not triggerd in that specific case. The reason, why it is not triggerd is that the if in ResourceBasePrivate::itemMoved l294: void itemMoved(const Akonadi::Item &item, const Akonadi::Collection &source, const Akonadi::Collection &destination) Q_DECL_OVERRIDE { if (item.remoteId().isEmpty() || destination.remoteId().isEmpty() || destination == source) { changeProcessed(); return; } AgentBasePrivate::itemMoved(item, source, destination); } in our case: item.remoteId().isEmpty() = false destination.remoteId().isEmpty() = true (destination == source) = false so we exit the job directy and do not forward the itemMoved to AgentBase so the resource itself can't move the files at all. As daniel discribe above, the dest collection do not have a local folder representation and is only a "virtual" folder in akonadi. And because the (maildir) resource don't get the notification at all, so it can't fix the problem. I am not sure what the intended policy is for 1) maildir folders whose content exists exclusively in the Akonadi DB and 2) moving _existing_ mail files to such destinations. If the folders (1) existed, this problem would not occur, but of course this might not make too much sense if (2) they would not receive any content anyway. I just hope that any fix would also work in the case of such not-yet-existing destination folders. |