Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just set up OpenDKIM on my CentOS 6 server but keep getting the following warning each time I start the service:

Cannot determine host's domain name, so skipping default key generation.

I have my server's hostname and domain name set up in /etc/sysconfig/network as well as in /etc/hosts but yet it seems that OpenDKIM fails to pick up that info.

Any ideas how I can fix this?

share|improve this question
Hi there, I am having the same problem. Did you ever fixed this? – James Wong May 26 '14 at 8:05
I can't recall as we switched over to a Windows server, but try removing localhosts from both of the files mentioned above - it might help. – Zishan May 27 '14 at 12:47
Thanks for getting back to me, i'll give it a try. – James Wong May 29 '14 at 1:59

Check you /etc/hosts, must like this:   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.