I just tried to track it down (once again). I deleted all config files
and directories that belong to kmail and akonadi and started with a
"fresh" install. I downloaded all mails from my account via pop3
(~17,000) and created new filters.

Filtering all the mails manually was no problem. Not a single mail was
duplicated. It sometimes took almost a minute until the mails were
actually moved and written to the respective place on the disc, but it
worked.

As soon as I got new mails from my account, and they were filtered as
they arrived, most of them were duplicated again.

I'm very sure this is a timing problem. First, the mail only exists
inside the (fast) akonadi cache and is processed by the filter, which
puts it in the target directory. It's also written on the respective
place on the disc there. Then, some (milli)seconds later, the original
mail is written to the inbox (which probably happens in a thread started
at the very same time the filter agent starts which does not know what
the filter agent does). And then, we have the un-filtered mail again
inside the inbox. The inbox notifies the filter agent that there's some
new mail inside the inbox and it's moved from there a second time by the
newly started filter agent.

I'll eat my hat if this is not the very cause of the duplicated filtered
mails. All the existing already-downloaded mails were already written to
the disc and did not live only inside the Akonadi cache, and thus, they
were not duplicated on filtering. For the few not-duplicated filtered
mails, it actually worked to write them to the disc before the filter
agent did his work. That's it.

Does really not one single KMail developer see this problem each and
every day?! I'd really like to help to fix this if anybody told me how …

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/883459

Title:
  KMail duplicates emails

To manage notifications about this bug go to:
https://bugs.launchpad.net/kdepim/+bug/883459/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to