0

We are deploying a console application based batch files to send emails. We take the content from the standard input and then pass it to Bmail and MgSMTP server.

Now we want to add a DKIM signature to the email. Since the app is written in batch, the only way to sign hashes is using openssl.exe.

I already have the bodyhash and the headerhash hashed with sha1 and encoded in base64.

The question is: How can I dkim sign emails?

rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38

1 Answers1

1

Well, after some research I found very useful this: OpenSSL C++ RSA sign is different from command line sign

echo "%headerhash%" | openssl rsautl -sign -inkey key.pem -out tempfile.pem