[Akonadi] [Bug 283682] KMail duplicates filtered messages

András Manţia amantia at kde.org
Tue Dec 16 10:16:40 GMT 2014


https://bugs.kde.org/show_bug.cgi?id=283682

--- Comment #121 from András Manţia <amantia at kde.org> ---
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 are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list