[kmail2] [Bug 343795] New: Accessing S/MIME encrypted attachments fails
hcc at gatech.edu
Wed Feb 4 22:25:42 GMT 2015
Bug ID: 343795
Summary: Accessing S/MIME encrypted attachments fails
Platform: openSUSE RPMs
Assignee: kdepim-bugs at kde.org
Reporter: hcc at gatech.edu
I received a presumably signed and encrypted S/MIME mail. I have the
corresponding private keys and kmail decrypts the mail correctly, i.e. I can
see the message body and I get those green and blue frames indicating the
signed and the encrypted parts. So far, so good.
The problem is that I cannot get access to a PDF that is attached to the mail.
kmail doesn't show the attachment icons in the "fancy header" section, but it
shows a PDF icon in the mail body.
The mail is a HTML mail that also has some plain text. In the HTML version
there is an embedded JPEG in the signature section of the email (not the crypto
signature, but the name,address,stuff part at the bottom...) When I toggle to
the HTML view I can see that image -- but I still cannot get to the PDF, all I
see is the same PDF icon. Hovering over either the icons in the mail's body
gives a notification at the bottom of the window of
"attachment:0,1.2?place=body" for the image and "attachment:0,2?place=body" for
the PDF. I cannot save any of them.
Steps to Reproduce:
With some help from #kontact I tried to expose the message structure. Here is
how far we got:
1) Saving the message as plain text: opening the mail in kmail, then selecting
"View Source" and saving the result (see  below for the header data)
2) We tried saving the crypto portion of that text file and decode it by hand
on the CLI. That failed.
3) Using the "Message Structure View" we used the "Save as" function of kmail
to save the crypto portion of the message as "smime.p7m"
4) I used kleopatra ("File"->"Decrypt/Verify Files...") to decrypt "smime.p7m".
The readable portion of the resulting "smime" file is below as 
5) I renamed "smime" to "smime.mbox" as then I could open the file with kmail
After all that I see a message window with an empty "fancy header" section, but
with two entries in the attachment section is shown. (one for the PDF, one for
the footer image). Hovering over either the icons in the "fancy header" section
or within mail's body gives a notification at the bottom of the window of
"Attachment: <file name>" I can now save both attachments.
Note that the window showing me the email still doesn't show a proper message
structure, it still only shows one line: "smime.p7m | application/x-pkcs7-mime
| <size>". Clicking "View source" in the window where I can read the email's
content shows me the same data as in "smime.p7m", given below as 
I would have expected to directly get access to the encrypted attachments.
 Plain text email (via "View Sources"). [I obfuscated the sender1]
Return-Path: alice at mail.com
Received: from orion.efm.de (LHLO orion.efm.de) (18.104.22.168) by
orion.efm.de with LMTP; Wed, 4 Feb 2015 17:32:10 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by orion.efm.de (Postfix) with ESMTP id 476F71D41DC6
for <claus at dadac0.de>; Wed, 4 Feb 2015 17:32:10 +0100 (CET)
X-Virus-Scanned: amavisd-new at orion.efm.de
Received: from orion.efm.de ([127.0.0.1])
by localhost (orion.efm.de [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id MlvzbLSEneSE for <claus at dadac0.de>;
Wed, 4 Feb 2015 17:32:10 +0100 (CET)
Received: from mout.gmx.net (mout.gmx.net [22.214.171.124])
by orion.efm.de (Postfix) with ESMTPS id C53331D41DD0
for <claus at dadac0.de>; Wed, 4 Feb 2015 17:32:09 +0100 (CET)
Received: from Vostro ([126.96.36.199]) by mail.mail.com (mrmail103) with ESMTPSA
(Nemesis) id 0LlDx4-1XkXb947ZG-00b79A for <claus at dadac0.de>; Wed, 04 Feb 2015
From: "Alice" <alice at mail.com>
To: "Claus Christmann" <claus at dadac0.de>
Subject: Geers Untersuchung
Date: Wed, 4 Feb 2015 17:31:54 +0100
Message-ID: <010d01d04098$191a6030$4b4f2090$@alice at mail.com>
X-Mailer: Microsoft Office Outlook 12.0
X-GBUdb-Analysis: 0, 188.8.131.52, Ugly c=0.434822 p=-0.588235 Source Normal
[only crypto text below]
: Readable header section of the decrypted attachment:
Content-Type: application/x-pkcs7-mime; name=smime.p7m; smime-type=signed-data
Content-Disposition: attachment; filename=smime.p7m
[only crypto text below]
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kdepim-bugs