After I download and filter mails often Akonadi synchronizes folder with filesystem needlessly. Reproducible: Sometimes Steps to Reproduce: 1. Have large folders. 2. Have some mailing list subscribed 3. Have some filter rules 4. Wait a while 5. Download and filter mails. I do downloading and filtering separately as to weed out spam before I do the filtering (due to Bug #319226 - produces 1-byte-sized on processing crm114 spam filter rules). Actual Results: Akonadi maildir resource hogs one core for minutes on synchronizing folder with filesystem contents. I didn´t verify it with strace again, but I am pretty sure it does the same as in bug #334209. Stating each file in the maildir folder. Expected Results: No synchronisation with filesystem, cause: 1) Akonadi uses Inotify to watch for folder changes. 2) Akonadi mailfilter moves mails with Akonadi. So Akonadi is supposed to know where these mails are now. Akonadi git 159bfbdf8667bb01b1f4c85ea144ca128ccb3195. ThinkPad T520, Sandybridge, Dual SSD BTRFS RAID 1 allowing concurrent accesses to two SATA-300 connected SSDs.
This still happens with KMail/Akonadi 16.04. Its not nearly as annoying as Akonadi maildir resource is much faster now on synchronisation folders. Its still synchronizing although it should know which mails mailfilter agent just moved to a different folder, instead of asking the filesystem about it.
Dan hinted me at disabling automatic synchronization for the folders in question. So I checked this setting: I had it disabled for Maildir resource main folder and all subfolders I checked are set to inherit that setting. So it seems at least after first start of Akonadi… or in some interval I do not yet have an exact clue about filtering a mail into a folder triggers a resynchronization despite disabled automatic synchronization.
This still happens with Akonadi 5.14.1 (20.04)