Bug 369245 - KMail 5.3.1: Attachments are included as plain text in forwarded or replied mails
Summary: KMail 5.3.1: Attachments are included as plain text in forwarded or replied m...
Status: RESOLVED DUPLICATE of bug 368060
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 5.3.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-23 14:39 UTC by Till Schäfer
Modified: 2016-10-26 14:35 UTC (History)
3 users (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 Till Schäfer 2016-09-23 14:39:46 UTC
For some (not all) mails with (binary) attachments, the attachments are included as plain text in forwarded or replied mails. 

A necessary condition seems to be, that the mail composer is using plain text. If i reply an e-mail in html format, everything works as expected. The configuration option "Reply or forward using HTML if present" therefore is a workaround for this bug. 

Reproducible: Always

Steps to Reproduce:
1. Reply to or forward an email with an attachment in plain text format

Actual Results:  
The binary content is embedded in the E-Mail text

Expected Results:  
forward: the attachment stays an attachment
reply: the attachment is removed

here is an example header of a mail, that triggers the bug: 

Return-Path: <anonymized>
Received: from unimail.uni-dortmund.de ([unix socket])
	 by unimail (Cyrus 2.5.9-8-g5134a9a.       0) with LMTPA;
	 Sun, 11 Sep 2016 20:01:51 +0200
X-Sieve: CMU Sieve 2.4
Received: from esa4.itmc.tu-dortmund.de (esa4.itmc.tu-dortmund.de [129.217.131.14])
	by unimail.uni-dortmund.de (8.16.0.19/8.16.0.19) with ESMTPS id u8BI1pDr009825
	(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
	for <smtiscae@unimail.uni-dortmund.de>; Sun, 11 Sep 2016 20:01:51 +0200 (CEST)
IronPort-PHdr: =?us-ascii?q?9a23=3AdeRkehYbwerxYpmMF1jZqfD/LSx+4OfEezUN459i?=
 =?us-ascii?q?sYplN5qZpcS9bnLW6fgltlLVR4KTs6sC0LuP9f6/EjVbsN7B6ClEK80UEUddyI?=
 =?us-ascii?q?0/pE8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0Iu?=
 =?us-ascii?q?frymUrDbg8n/7e2u4ZqbO1wO32vkJ+0tZ0zt/E2R7pBQ2to6bP5pi1PgmThhQ6?=
 =?us-ascii?q?xu32RmJFaezV7Xx/yb29pdyRlWoO8r7MVaUK/3LOwSRL1cCyk6YShuvJW4/S/5?=
 =?us-ascii?q?YyDKo1EVXl4blAFJHwnb7Q3rFter6mqp/tZ6jRWbOcm+Gaw1XTD4qbxgSBblhi?=
 =?us-ascii?q?odHyIktW3QkNB1kaRX5h6s8U9R2YnRNZucMPQ7dKTQcd8XRmdbdtlcXWpND9Dv?=
 =?us-ascii?q?J7ATBvYMaL4L57L2oEED+EHmCA=3D=3D?=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0G/AgC7m9VXhw4P49SERwEBAQEBuViCe?=
 =?us-ascii?q?xeHcQQCAQIBAQIQAQEBHgmCegQDGM4i61Q?=
X-IPAS-Result: =?us-ascii?q?A0G/AgC7m9VXhw4P49SERwEBAQEBuViCexeHcQQCAQIBAQI?=
 =?us-ascii?q?QAQEBHgmCegQDGM4i61Q?=
X-IronPort-AV: E=Sophos;i="5.30,318,1470693600"; 
   d="pdf'?rar'52?scan'52,208,217,52";a="158717687"
Received: from mout.web.de ([212.227.15.14])
  by esa4.itmc.tu-dortmund.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2016 20:01:21 +0200
Received: from [85.22.85.17] by 3capp-webde-bs64.server.lan (via HTTP); Sun,
 11 Sep 2016 20:01:21 +0200
MIME-Version: 1.0
Message-ID: <trinity-3cb8a1a0-15f8-421a-8c9e-763880f38a79-1473616881217@3capp-webde-bs64>
From: anonymized
To: Till <till2.schaefer@tu-dortmund.de>
Subject: Ausdrucke
Content-Type: multipart/mixed;
 boundary=rekcebs-7e59eea0-b75e-4746-893a-09eff6b08356
Date: Sun, 11 Sep 2016 20:01:21 +0200
Importance: normal
Sensitivity: Normal
X-Priority: 3
X-Provags-ID: V03:K0:eV0YsKLQFHFmkiHWW93ornkAYSqnMamggnrwh7RG9AV
 1AZBhd8tyXAhMKH4T667OUyW/OoE+lBR4YRr/2+81ifm20ABQN
 FY/VnRZNpd7H2plx4/gm4PeAH3fFtvBR+KkeXTer/lgatPL2NI
 tANpAi87QSNCdjlbD1If3MZod0z0LI7cfSMRX3uN0eFk5U1xsD
 WaDTF74Pw/DjctgQrAK7PYsPU29ZELnCyGuyJCNCa/k29GmaSZ
 eSt7RybdE0fQPtwXCjSpunY/aAKfzlBm3WriR4d8J2EuiF5lEf Ckux0Q=
X-UI-Out-Filterresults: notjunk:1;V01:K0:DCd7m6feAFo=:1naEPQauOMJQdJCN/xGmMg
 c1Xt+69XHV7bvPDGhkDofNxzn5bAQp7uI3LBTrZHt7cUc88O9XSaa+VidtLW+r1DSne9hjdsb
 YjZenuM9XfN9/iLf/4/i6OVri0xF/N7xTT3jV6RFq4WAsxANVJp2fkq5VcJ3GvWJ3Fb0hOHh8
 D08BhFwRdKSe57fq8dX5bFumcmPL9ES7VAVqJpnjhwCG9FFN1dDxUPRHRq/YT2vZ1u6CjJWRp
 fIksvfkEtGS5Imzc6r/cI8kKxGbBoX6o2F6nENwEv/99bEhyNukZAdDANb9K4lM3wbMYKuqDy
 s+8qmAkBa+ia9tf53w1JthfTNm7jDS/dWz8zY1XWckQU1M3/DL9le8ZwGSeM8TtkFMlIetyhR
 4Sxh3dxOnMQumUvomqy3ILypayF/m7KiEJG7BvGdXqlqPWGDBPbpMqb9NW3rj

 
--rekcebs-7e59eea0-b75e-4746-893a-09eff6b08356
Content-Type: text/html; charset=UTF-8

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi Till,</div>

<div>&nbsp;</div>

anonymized

<div>&nbsp;</div></div></body></html>
--rekcebs-7e59eea0-b75e-4746-893a-09eff6b08356
Content-Type: application/force-download
Content-Disposition: attachment; filename=Ausdrucke.rar
Content-Transfer-Encoding: base64

UmFyIRoHAM+QcwAADQAAAAAAAAApsXQgkFAABHABALGXAQACExemwl23KkkdMysAIAAAAEF1c2Ry

anonymized

EAAAAEF1c2RydWNrZQDwqklLxD17AEAHAA==
--rekcebs-7e59eea0-b75e-4746-893a-09eff6b08356--
Comment 1 Simon Levitt 2016-10-26 00:38:38 UTC
Think this might be related to what causes the issue https://bugs.kde.org/show_bug.cgi?id=368060.

In looking into that I discovered that the attachment object (in the code) extends a text part (which is why is was being used for the quote text), that could well be why a textual MIME type is being chosen here also.
Comment 2 Sandro Knauß 2016-10-26 14:35:30 UTC
The base problem is that a html mail with attachments, so lets merge

*** This bug has been marked as a duplicate of bug 368060 ***