I am trying to send an S/MIME encrypted email through a pre-defined email distribution system.
I give them a perfectly valid email, with all the right headers and correctly encrypted content.
The problem is, that the system rips the email apart and creates a new 'multipart/mixed' message from it, with the smime.p7m attached as an attachment.
Though Thunderbird somehow manages to encrypt the content the right way, others like Outlook don't and just show an empty message.
My question here is: Is is even possible to have the S/MIME message as part of a multipart message?
An example of how the newly created message looks like:
...
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="_=_swift_v4_1474547127_a48edcebcdce51b8c8f455_=_"
--_=_swift_v4_1474547127_a48edcebcdce51b8c8f455_=_
Content-Type: application/x-pkcs7-mime; smime-type=enveloped-data; name=smime.p7m
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m
MIMDul4GCSqGSIb3DQEHA6CDA7pOMIMDukkCAQAxggJuMIICagIBADBSMEUxCzAJBgNVBAYTAkFV
...
--_=_swift_v4_1474547127_a48edcebcdce51b8c8f455_=_--