Configure DomainKeys (OpenDKIM) with Postfix on CentOS 7

Pradeep Kumar

I am a huge fan of open source and love to share How To's tutorials on Linux, Cloud and DevOps. I have been working as Linux Consultant, Cloud & DevOps Engineer since 2010

You may also like...

7 Responses

  1. anibal says:

    What does “hash -r” do? and how can it be installed?
    thank you

  2. fusionstream says:

    How do you make a keygen for another domain besides whatever is returned by hostname?

    Also, how do you do this for multiple domains?

  3. Aizat says:

    After entering ‘cat /etc/opendkim/keys/default.txt’ I got a ‘DKIM key default for com’ and not my domain name at the end of the message.

    At the start when I ran the command ‘opendkim-default-keygen’, I got a message ‘Default DKIM keys for com created in /etc/opendkim/keys.’ instead of one with my domain name. There isn’t any step defined in your tutorial to change this.

  4. Ric says:

    To me, step 3 is incomplete as no domain is being specified here.
    Maybe the use of these would be relevant (where mydomain.com is your domain name):
    mkdir /etc/opendkim/keys/mydomain.com
    opendkim-genkey -D /etc/opendkim/keys/mydomain.com/ -d mydomain.com -s default
    chown -R opendkim: /etc/opendkim/keys/mydomain.com
    mv /etc/opendkim/keys/mydomain.com/default.private /etc/opendkim/keys/mydomain.com/default

  5. Garry says:

    Hi, I got a problem to start openDKIM. It comes out error for “Starting OpenDKIM Milter: opendkim: /etc/opendkim.conf: refile:/etc/opendkim/TrustedHosts: dkimf_db_open(): Permission denied

    I try to change permission for 664. It seem not work. Do you have any idea and suggestion for solve this problem?

  6. Maxime says:

    Thanks ! Followed your instructions and it worked straight out of the box.

Leave a Reply

Your email address will not be published. Required fields are marked *