4

opendkim-genkey: openssl exited with status %d

This is the error I get when trying to create a DKIM key. My emails are working for gmail fine but failing when sent to hotmail / outlook. I am hoping by adding a DKIM record this will help, but I am unable to create the files due to the openssl error. Unable to figure this out so far.

I have seen answers suggesting the path must include path => ["/usr/sbin/", "/usr/bin"], opendkim-genkey: openssl exited with status %d

My path has these added but it still fails echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

cuznerdexter
  • 141
  • 3

2 Answers2

3

If openssl does not have write permissions in the current directory this error happens. Simply prefix your command with sudo:

sudo opendkim-genkey -s mail -d example.com -vvv

0

try

$/sudo openkim-testkey -d yourdomain.com -s default -vvv

The sudo will help you to test the key. It helped me to not have the error you mentioned.

3ddy
  • 1
  • 1
  • 3
    Rather than simply giving a bare comment, it might be worth saying what this comment is, and how this actually helps in this situation. Is it the sudo that's the special sauce here? Rather than bolding the sudo, you might want to use inline code blocks and explain how the sudo is helpful – Journeyman Geek Aug 13 '19 at 10:54