Forwarding emails in kmail

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Forwarding emails in kmail

Postby jiml8 » Sep 16th, '14, 23:09

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.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Forwarding emails in kmail

Postby wintpe » Oct 9th, '14, 12:19

yes

sendmail

if its not obvious ill explain

sendmail is used to route mail all over the place (so is postfix, a sendmail replacement) .

postfix is often used where simple sendmail in inbound gateway is required, and the implementer wants something simpler to implement.

But sendmail has far more flexibility in its rewriting engine.

alot of people who use sendmail use m4macros to simplify its rule writting,

but under the hood the sendmail.cf contains the sendmail raw rules, and this is where the full power of sendmail lies.

The mail rewriting language can do all of what you are asking, but its a steep learning curve.

The O'riely sendmail book has all the detail.

there may already be a macro that suits your purpose exactly, saving you brain ache, but ultimatly if it does not do what you want exactly you can edit the rules directly.

This post will only open the door to the solution, still a bit of work to get what you want.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Forwarding emails in kmail

Postby doktor5000 » Oct 11th, '14, 22:21

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18020
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Forwarding emails in kmail

Postby jiml8 » Oct 14th, '14, 21:28

I did not think of sendmail...

I have torn my hair out in the past trying to configure it...I guess I should take another look at it for this purpose.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest