[Bug 883459]

Andras Mantia amantia at kde.org
Tue Dec 16 10:16:40 UTC 2014


Tobias Leopold, you are probably right of being a timing issue. If you can reproduce it, and could work on the code, the chances of fixing it would be high(er). As I pointed out already, I use POP3 and IMAP with local filters on two machines and didn't see this problem for a long time, so best would be to fix on a machine where it actually manifests it.
 It was a long time ago when I last worked on Akonadi/KMail code, but here are some hints:
- add debug output (possibly with timestamps) in the filtering and the akonadi code. You might have to do that both in the akonadi server and the akonadi resources (filter agent and the base classes)
- the filter agent is in kdepim/mailfilteragent, the starting point could be mailfilteragent.cpp and there the itemAdded() method. This is called when a new mail appeares in a monitored folder (ie. the inbox)
- itemsReceiviedForFiltering() there is called when the filter agent retrieves the above item (so it can analyze that it needs to be filtered or not)
- interesting code could be also in Akonadi::AgentBase class (kdepimlibs repository) and the changeRecorder() part, but only if you can't figure out anything useful from the above
- mailfilteragent/filtermanager.cpp is the code that does the filtering. processContextItem() is the method that does the move/copy of the messages. Adding debug output here also makes sense to see when does this happen
- for the server itself you can enable debugging in the akonadiconsole app, although this will give you lots of data and will make things slow, so better make sure you don't get lot of mails while debugging is enabled. But it can show all the communication between the akonadi server and the clients and all the jobs running and their order.

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdepim in 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




More information about the kubuntu-bugs mailing list