Bug 293309 - KMail distort mail header when use filter with pipe
Summary: KMail distort mail header when use filter with pipe
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Filter Agent (show other bugs)
Version: 4.8
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2012-02-04 17:21 UTC by Lukáš Karas
Modified: 2018-10-27 02:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukáš Karas 2012-02-04 17:21:24 UTC
Version:           4.8 (using KDE 4.8.0) 
OS:                Linux

When I created filter with *cat* program in pipe, and use this filter on some messages, KMail modify headers. In result, html mail is no longer displayed correctly.

I expect that new (filtered) message should be same as original, when I use *cat* program. Or I misunderstand what pipe filter mean?

This behavior breaks any spam filter!

Reproducible: Didn't try

Steps to Reproduce:
I have one simple filter with cat program in pipe

[Filter #0]
Applicability=0
AutomaticName=true
ConfigureShortcut=false
ConfigureToolbar=false
Enabled=true
StopProcessingHere=false
ToolbarName=Bogofilter Check
action-args-0=cat
action-name-0=filter app
actions=1
apply-on=check-mail,manual-filtering
contentsA=256000
fieldA=<size>
funcA=less-or-equal
identifier=HOK0Iz22cIN8toEj
name=Bogofilter Check
operator=and
rules=1

[General]
filters=1


Original HTML message recieved with KMail:


Received: from ironport5.centrum.cz (unknown [10.32.3.101])
	by gmmr5.centrum.cz (Postfix) with ESMTP id B041080175A7
	for <lukas.karas@centrum.cz>; Sat,  4 Feb 2012 18:05:48 +0100 (CET)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Al4BADNkLU/RVdeykGdsb2JhbABDgl2CLoR+pDdiCCIBAQEBCQkNBxQEHQSCCwIFCh0BGx4DEggBAi4OAiURAQUBIjWHXZkAgl0KiyZLgnCEOz+IcQIFC4wEBgEqEwIDAQEBAQEBAQGCeQUCAgQBCwICBAUDAwMBBQUBZwEEBCQEghmBFgScOYcLPYQD
Received: from mail-ey0-f178.google.com ([209.85.215.178])
  by mx.centrum.cz with ESMTP; 04 Feb 2012 18:05:48 +0100
Received: by mail-ey0-f178.google.com with SMTP id o10so1997149eaa.23
        for <lukas.karas@centrum.cz>; Sat, 04 Feb 2012 09:05:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:x-mailer:mime-version:content-type;
        bh=K4MBVe6UZavBlrfxwwwwa4FkOBE+od9SOSQD5xtAF1A=;
        b=SD9j39RxBLyI5ZbcwI3y4esmeYXNIsn+IFOf7JFFI/d46Y/o73DAIl9EVP8QyzjA0y
         KUggVfCmBjhcgQ/6wASJfdrcdI8PI+GyjrS2cKi9yg+qGdp5vpb/rCiTrx+u6Z/UKFg8
         v+bWXQxuycEa/Hh+H/CpHU3G7xrI8OwRRSvgs=
Received: by 10.213.9.4 with SMTP id j4mr1872698ebj.100.1328375148460;
        Sat, 04 Feb 2012 09:05:48 -0800 (PST)
Received: from www.palm.com (ip-85-161-86-7.eurotel.cz. [85.161.86.7])
        by mx.google.com with ESMTPS id t11sm37047468eea.10.2012.02.04.09.05.46
        (version=SSLv3 cipher=OTHER);
        Sat, 04 Feb 2012 09:05:47 -0800 (PST)
Message-ID: <4f2d656b.0b230e0a.39c4.fffff3ff@mx.google.com>
Date: Sat, 04 Feb 2012 18:05:47 +0100
From: <karry.cz@gmail.com>
To: "=?UTF-8?Q?Luk=C3=A1=C5=A1_Karas?=" <lukas.karas@centrum.cz>
Subject: Test
X-Mailer: Palm webOS
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Multipart_=_Boundary_=_1328375146"


--Multipart_=_Boundary_=_1328375146
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Mail content
--Multipart_=_Boundary_=_1328375146--


After process filter (Ctrl+J), message source is:

Received: from ironport5.centrum.cz (unknown [10.32.3.101]) by gmmr5.centrum.cz (Postfix) with ESMTP id B041080175A7 for <lukas.karas@centrum.cz>; Sat,  4 Feb 2012 18:05:48 +0100 (CET)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Al4BADNkLU/RVdeykGdsb2JhbABDgl2CLoR+pDdiCCIBAQEBCQkNBxQEHQSCCwIFCh0BGx4DEggBAi4OAiURAQUBIjWHXZkAgl0KiyZLgnCEOz+IcQIFC4wEBgEqEwIDAQEBAQEBAQGCeQUCAgQBCwICBAUDAwMBBQUBZwEEBCQEghmBFgScOYcLPYQD
Received: from mail-ey0-f178.google.com ([209.85.215.178]) by mx.centrum.cz with ESMTP; 04 Feb 2012 18:05:48 +0100
Received: by mail-ey0-f178.google.com with SMTP id o10so1997149eaa.23 for <lukas.karas@centrum.cz>; Sat, 04 Feb 2012 09:05:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:x-mailer:mime-version:content-type; bh=K4MBVe6UZavBlrfxwwwwa4FkOBE+od9SOSQD5xtAF1A=; b=SD9j39RxBLyI5ZbcwI3y4esmeYXNIsn+IFOf7JFFI/d46Y/o73DAIl9EVP8QyzjA0y KUggVfCmBjhcgQ/6wASJfdrcdI8PI+GyjrS2cKi9yg+qGdp5vpb/rCiTrx+u6Z/UKFg8 v+bWXQxuycEa/Hh+H/CpHU3G7xrI8OwRRSvgs=
Received: by 10.213.9.4 with SMTP id j4mr1872698ebj.100.1328375148460; Sat, 04 Feb 2012 09:05:48 -0800 (PST)
Received: from www.palm.com (ip-85-161-86-7.eurotel.cz. [85.161.86.7]) by mx.google.com with ESMTPS id t11sm37047468eea.10.2012.02.04.09.05.46 (version=SSLv3 cipher=OTHER); Sat, 04 Feb 2012 09:05:47 -0800 (PST)
Message-ID: <4f2d656b.0b230e0a.39c4.fffff3ff@mx.google.com>
Date: Sat, 04 Feb 2012 18:05:47 +0100
From: karry.cz@gmail.com
To: =?utf-8?B?THVrw6HFoQ==?= Karas <lukas.karas@centrum.cz>
Subject: Test
X-Mailer: Palm webOS
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"


--Multipart_=_Boundary_=_1328375146
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Mail content
--Multipart_=_Boundary_=_1328375146--




Expected Results:  
I expected that this filter don't change message.
Comment 1 Tobias Koenig 2012-02-11 23:26:15 UTC
Hej Lukáš,

can you test latest master branch, please?
I commited a fix today that might have fix your issue. At least I can't reproduce it here.
Comment 2 Lukáš Karas 2012-02-17 12:37:07 UTC
It still occurs for me... Kmail2 (KMail: 4.9 pre, from git) change content-type of message from 

Content-Type: multipart/mixed; boundary="Multipart_=_Boundary_=_1329480346"

to 

Content-Type: text/plain; charset="US-ASCII"

When I use "cat" filter. That destroy html presentation of message. I send test message to your mail... Can you test it on this message please?
Comment 3 Andrew Crouthamel 2018-09-22 01:53:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Andrew Crouthamel 2018-10-27 02:33:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!