# Issue with S/MIME decryption most likley caused by Exchange attaching corporate signatures

**URL:** <https://community.ciphermail.com/t/issue-with-s-mime-decryption-most-likley-caused-by-exchange-attaching-corporate-signatures/613>\
**Category:** Gateway\
**Created:** [April 16, 2018, 3:27pm UTC](https://community.ciphermail.com/t/issue-with-s-mime-decryption-most-likley-caused-by-exchange-attaching-corporate-signatures/613 "2018-04-16T15:27:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olaf\_Schwarz1](https://avatars.discourse-cdn.com/v4/letter/o/3da27b/32.png) [@Olaf\_Schwarz1](https://community.ciphermail.com/u/Olaf_Schwarz1)\
**Post date:** [April 16, 2018, 3:27pm UTC](https://community.ciphermail.com/t/issue-with-s-mime-decryption-most-likley-caused-by-exchange-attaching-corporate-signatures/613/1 "2018-04-16T15:27:19Z")

</div>

Hi all,

I have an issue with the decryption of S/MIME mails, and hope someone  
can be of help.  
To be honest I did not got very deep down the rabbit hole with this one,  
as I expect it to be a common problem someone else might already have  
solved.

Issue description:  
S/MIME mail is decrypted but given back to the mail queue as an empty  
mail with an attachment called "smime.p7m". This attachment includes the  
message in plain and certificate information. But this does not happen  
with all S/MIME encrypted mails.

Ciphermail Version:  
Version: 3.3.1-0. Built: 2017-10-07-08:36.

Current thoughts:  
I guess this might be related to mails which are signed\encrypted by a  
local client and the corporate exchange server adds corporate text  
signatures to that mail. ( like the "think before print " or legal  
disclaimers)  
Looking into the mails after ciphermail has decrypted them shows the  
following difference:  
Mails that get decrypted to empty message and "smime.p7m" attachment  
shows:  
Content-Type: application/x-pkcs7-mime;

Mails decrypted correctly:  
Content-Type: application/pkcs7-mime;

Thanks in advance for any hint/help.  
olaf

---

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [April 16, 2018, 7:18pm UTC](https://community.ciphermail.com/t/issue-with-s-mime-decryption-most-likley-caused-by-exchange-attaching-corporate-signatures/613/2 "2018-04-16T19:18:57Z")

</div>

> Hi all,
> 
> I have an issue with the decryption of S/MIME mails, and hope someone  
> can be of help.  
> To be honest I did not got very deep down the rabbit hole with this one,  
> as I expect it to be a common problem someone else might already have  
> solved.
> 
> Issue description:  
> S/MIME mail is decrypted but given back to the mail queue as an empty  
> mail with an attachment called "smime.p7m". This attachment includes the  
> message in plain and certificate information. But this does not happen  
> with all S/MIME encrypted mails.
> 
> Ciphermail Version:  
> Version: 3.3.1-0. Built: 2017-10-07-08:36.
> 
> Current thoughts:  
> I guess this might be related to mails which are signed\encrypted by a  
> local client and the corporate exchange server adds corporate text  
> signatures to that mail. ( like the "think before print " or legal  
> disclaimers)

CipherMail contains code to gracefully handle S/MIME unaware disclaimer  
software, i.e., CipherMail can detect whether a disclaimer was added to  
an S/MIME message, thereby creating a non S/MIME message, and repair the  
message. It does this by changing the smime message into an attached  
message (application/rfc822).

> Looking into the mails after ciphermail has decrypted them shows the  
> following difference:  
> Mails that get decrypted to empty message and "smime.p7m" attachment  
> shows:  
> Content-Type: application/x-pkcs7-mime;
> 
> Mails decrypted correctly:  
> Content-Type: application/pkcs7-mime;

The Content-Type application/x-pkcs7-mime is the old content type for  
S/MIME messages. Some email clients like for example Outlook still use  
the old style headers. application/pkcs7-mime is the new style headers  
for S/MIME. Thunderbird and CipherMail are using the new style headers.  
The difference in content type should not be the reason why certain  
emails fail.

Can you share the MIME headers of the message that failed?

Kind regards,

Martijn Brinkers

> **···**
>
> On 16-04-18 17:27, Olaf Schwarz via Users wrote:
> 
> --  
> CipherMail email encryption
> 
> Email encryption with support for S/MIME, OpenPGP, PDF encryption and  
> secure webmail pull.
> 
> > **[CipherMail email encryption and digital signatures](https://www.ciphermail.com)**
> >
> > Easy to use server-side email encryption for automatic encryption and digital signing of email.
> 
> Twitter: [http://twitter.com/CipherMail](http://twitter.com/CipherMail)
