How to use openssl smine sign the email body only
anyegongjue
kerry-fly at 163.com
Fri Jul 12 01:58:12 UTC 2019
Maybe I posted too many stuff. What my problem is "openssl smime" command
signed everything fed to it. For example, I wanted to sign the following
email body.
/*Hi there,
This is an test email.*
/
And after signed, the email became something like below,
/Received: from localhost [127.0.0.1] by with HTTP; Thu, 11 Jul 2019
16:24:33 +1000
Date: Thu, 11 Jul 2019 16:24:33 +1000
To: Kerry Fly <kerry-fly at xxx.com>
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
micalg="sha-256"; boundary="----5D53D58F876671D7CA85A8CD28305ABB"
This is an S/MIME signed message
------5D53D58F876671D7CA85A8CD28305ABB
*Hi there,
This is an test email.*
------5D53D58F876671D7CA85A8CD28305ABB
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
MIIIFAYJKoZIhvcNAQcCoIIIBTCCCAECAQExDzANBglghkgBZQMEAgEFADALBgkq
hkiG9w0BBwGgggVmMIIFYjCCBEqgAwIBAgISA2D+gfTao7ImMR5FeJceYRQOMA0G
...
Y/5+MrMjklc=
------5D53D58F876671D7CA85A8CD28305ABB--/
And if I pass the email content with some headers, smime will wrap the
header inside, too. Like below
/Received: from localhost [127.0.0.1] by with HTTP; Thu, 11 Jul 2019
16:24:33 +1000
Date: Thu, 11 Jul 2019 16:24:33 +1000
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
micalg="sha-256"; boundary="----5D53D58F876671D7CA85A8CD28305ABB"
This is an S/MIME signed message
------5D53D58F876671D7CA85A8CD28305ABB
*Received: from localhost [127.0.0.1] by with HTTP; Thu, 11 Jul 2019
16:24:33 +1000
Date: Thu, 11 Jul 2019 16:24:33 +1000
To: Kerry Fly <kerry-fly at xxx.com>
From: email_marketing at xxx.com
Reply-To: email_marketing at xxx.com
Subject: New T-shirt arrived
Message-ID: <iAmrfVkiuViEWn0VFDckd9c3N3dzoLdcYhKk8VNrM at xxx.com>
X-Mailer: xxx.com
X-MessageID: ABsLBhQBCA4
X-ListMember: kerry-fly at xxx.com
Precedence: bulk
List-Unsubscribe:
<http://xxx.com/email_marketing/email_marketing_subscribers/unsubsc
ribe/ABsLBhQBCA4>
List-Owner: <mailto:email_marketing at xxx.com>
Error-To: email_marketing_bounce at xxx.com
Bounces-To: email_marketing_bounce at xxx.com
Hi there,
This is an test email.*
------5D53D58F876671D7CA85A8CD28305ABB
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
MIIIFAYJKoZIhvcNAQcCoIIIBTCCCAECAQExDzANBglghkgBZQMEAgEFADALBgkq
hkiG9w0BBwGgggVmMIIFYjCCBEqgAwIBAgISA2D+gfTao7ImMR5FeJceYRQOMA0G
...
Y/5+MrMjklc=
------5D53D58F876671D7CA85A8CD28305ABB--/
Then the header inside smime cannot be seen by receiver, like gmail. And in
this way, I cannot send emails.
So my question is that is there a way to use "openssl smime" to sign some
email with headers?
Thank you in advance.
--
Sent from: http://openssl.6102.n7.nabble.com/OpenSSL-User-f3.html
More information about the openssl-users
mailing list