Summary: | Filter Action "pipe through" doesn't change the E-Mail | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | biesold |
Component: | filtering | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caco3, montel, paolo.herms, sverre, t.zumbrunn, tokoe |
Priority: | NOR | ||
Version: | 2.0.89 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Script to edit mails with 'Pipe through' |
Description
biesold
2010-12-18 16:12:54 UTC
Version: 1.13.6 (using KDE 4.5.5) OS: Linux (openSUSE packages) I have the same problem with another version of Kmail. A simple example bash script acting as a filter would e.g. be: #!/bin/bash sed -n '1h;1!H;${;g;s/foo/bar/g;p;}' If I save this script to a file, make it executable, add it to my PATH and then use it in a Kmail filter action "pipe through" for incoming messages, the messages are not changed. However, if I apply the filter via the menu "Apply Filter", the messages are changed. I'd like to withdraw my previous comment. I made a mistake by searching for a header field which is only added by Kmail after the "pipe through" filter action. I have exactly the same problem :( I have a script shich should replace a character by another one: ----8<---------- #!/bin/bash sed -n '1h;1!H;${;g;s/-/*/g;p;}' > /tmp/filter.txt ; cat /tmp/filter.txt ----8<---------- I added it to the filter settings (pipe through). When I apply this filter to an email, the email body does not change. How ever when I check the content of /tmp/filter.txt, it contains the changed email. Or when I run the script in the terminal echo "aaa-bb-cc" | Scripts/kmail_sleepanalyser_bug_filter.sh it returns the changed content. So this means to me that my script works, how ever kmail seems not to take the changed content. Any suggestions what I am doing wrong? Git commit 49852b34c2701dbd9ba3d10e3530b8cdb3949bb8 by Tobias Koenig. Committed on 04/06/2011 at 11:00. Pushed by tokoe into branch 'master'. Write back changed item payload to Akonadi storage This fixes the 'pipe through' filter action in KMail. BUG: 260638 M +2 -0 mailcommon/filteraction.cpp http://commits.kde.org/kdepim/49852b34c2701dbd9ba3d10e3530b8cdb3949bb8 Hej, this bug has been fixed in the meantime and is not reproducible in current master branch. Ciao, Tobias Git commit e24f96fe1679ec674db0e2f192af0e6ced782653 by Tobias Koenig. Committed on 04/06/2011 at 11:00. Pushed by tokoe into branch '4.6'. Write back changed item payload to Akonadi storage This fixes the 'pipe through' filter action in KMail. BUG: 260638 (cherry picked from commit 49852b34c2701dbd9ba3d10e3530b8cdb3949bb8) M +2 -0 mailcommon/filteraction.cpp http://commits.kde.org/kdepim/e24f96fe1679ec674db0e2f192af0e6ced782653 Has there been a regression for this bug? I'm seeing this exact behavior with 4.8RC2 when (manually) applying a pipe-through-bogofilter filter to a message in my input folder. Using the tee construct in the original bug report, the /tmp/out.txt contains the expected X-Bogosity header whereas the file in the input folder does not. Both files have the same modification date, however. This is on NetBSD-current (I'm working on a port of 4.8). I confirm the problem reappears on manual filtering in kmail 4.9. Can this bug be reopened? Give exacte method, filter that you use for reproduce it please. Just as Sverre Froyen described, when I click on an existing email and do "Apply all filters", then my filter rule with a pipe through action is triggered and the command launched as shown by filter log viewer and output of the command stored with tee, but the message is left unchanged. The filter works correctly on newly incoming mails. Created attachment 78057 [details]
Script to edit mails with 'Pipe through'
I'm using KMail version 4.9.5 and I get the same behavior described above.
I have a script that copies the whole message (STDIN) to a temporary file, opens an editor with that file, waits for the editor to close and then cat's the file to STDOUT. I use it in manual filtering with 'Pipe through', but now it doesn't change the message (the temporary file is correctly changed)
I upload the script and request the bug to be re-opened.
|