I've really been struggling for days with this but I fixed it. I have two identical server, both with identical OS versions, everything. I fixed it by comparing OpenDKIM conf files and the problem server had these two lines. . .
Renmoving them i.e. making the file the same as the functioning server immediately fixed a number of issues e.g. mails not being signed. My questions are:
What do these two lines do and have I broken something by removing them? What would cause totally identical server to create differing conf files in this way?