I've installed OpenDKIM to sign the outgoing emails sent from Postfix mail server following this guidelines:

After following them, I've checked the DKIM Key here and it successfully finds a DKIM key with the provided selector. But still the emails are not being signed properly with the private key. After troubleshooting I find that the OpenDKIM process is not running in the server.

Then I tried to run the process manually:

sudo service opendkim start

which results in following error:

Starting OpenDKIM: opendkim: /etc/opendkim.conf: /etc/postfix/dkim.key can be read or written by other users opendkim.

Before that I'd changed the permissions of dkim.key file to 755 and changed the ownership of the file to the user opendkim from the group opendkim:

sudo chmod 755 /etc/postfix/dkim.key

sudo chown opendkim:opendkim /etc/postfix/dkim.key

How can I run the process opendkim?

  • mine's perms are: -rw------- opendkim opendkim – ebal Aug 30 '16 at 6:31
  • You should set the UserID option in opendkim.conf correctly. It seems to be set to postfix by default. 0400 is a reasonable permission setting for the private key that is not supposed to be changed. – Dmitri Chubarov Feb 17 '17 at 16:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.