Site icon My Blog

Installing OpenDKIM

Follow these steps to install OpenDKIM on Ubuntu and Plesk.
I will use domain.tld (as the primary domain) and example.com as my domains, I have enabled subdomains so mail from the server mail.domain.tld gets signed too as in this case mail.domain.tld is also the Posfix hostname and mailname…

1. First login as root as run…

2. Create the folder structure…

3. Create a key, I’ll use “dkim” as the selector and create 1024bit keys
You will have two files in the folder, dkim.private and dkim.txt, the latter contains the DNS record for you to add in Plesk or at your domains registrar.

4. Now we’ll create the SigningTable and the KeyTable…

The contents should look like…

5. And the KeyTable…

The contents should look like…

You can see the subdomains point to the same key as the domain.

6. Next we have to create the internal hosts file…

and add your IP and host names…

7. Now edit /etc/opendkim.conf

And define these settings…

8. Make sure you create the log directory, and the log file is owned by opendkim:opendkim

9. We now need to define the socket…

And uncomment…

10. And restart opendkim

11. Our last step is too add this milter to our postfix configuration file…

Restart Postfix…

And you should be good.

Exit mobile version