I am looking for a tool. I'll write it if I have to, but it would be so much better if this tool already exists.
Basically, my kmail installation collects email from many different accounts, and runs all those emails through spam filtering. When it is done with the filtering, any email that is not spam is both placed in the inbox and forwarded to another email address, and that email address is the only one that my android phone checks. Thus, I receive only filtered emails on my mobile device, and I receive emails from all accounts while only setting up one account for the android to check.
This works fine, with the following issues: (1) all emails that the android receives are prefaced with [fwd] from kmail, and (2) all forwarded emails wind up in the sent folder for kmail. Both of these cause me extra work; when replying from the android I have to edit the subject header and make sure I have the right reply to header filled in, and in kmail I am (once or twice a day) deleting all the forwarded emails from the sent folder.
Now, it would be a lot nicer if, instead of my kmail filters doing a "forward to", they did a "pipe through", naming a tool that would handle the forwarding without attaching the [fwd] or storing the message in the sent folder. In the alternative, if there was a cron job that would periodically run and remove the forwarded emails from the sent folder, I could live with that; I don't often have to respond to an email from my android device; most of my traffic is information only.
If it weren't for akonadi, the cron job would be trivial; just grep for the right forwarding info and delete the file from the directory it is stored in. But the fact that there is a database involved makes it a lot trickier.
I'll write this tool if I have to. But by the time I have worked out all the details and properly handle all the headers, and so forth, I'll have a couple days in it and right now I'm busy and would rather not spend the time. Far better if I can find a tool that does the job already. I have searched and found nothing...but perhaps I just have not hit on the right keywords.
Does anyone have any ideas?
As a peripherally related comment, I'll just mention that I have installed opencloud on my NAS (which runs Nas4Free...a BSD-based package), and integrating Kontact with Opencloud proved to be a very simple process - akonadi explicitly supports opencloud - as did integrating my android with opencloud. Thus, my calendars and contacts are being automatically synchronized between kmail and my android (very helpful) without making use of third-party (spying and insecure) cloud services.