Issues with OpenDKIM

I spent the better part of two days trying everything under the sun to get OpenDKIM to work on our server. Finally found the solution.

No matter what I changed, OpenDKIM would not listen on port 8891. Finally, I discovered that in the opendkim.service file it was not loading it to 8891, but to a sock file.

// HTML CODE

ExecStart=/usr/sbin/opendkim -P /var/run/opendkim/opendkim.pid -p local:/var/run/opendkim/opendkim.sock

It needed to be changed to:

// HTML CODE

ExecStart=/usr/sbin/opendkim -P /var/run/opendkim/opendkim.pid -p inet:8891

Restart OpenDKIM and Postfix and you should be up and running again.