Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have three servers configured to relay mail. I am using dkim-milter with postfix on CentOS 5.5. I created domain keys on the command line for each server. My issue is that the domain key is different for each server, and I have to setup different DNS records for each relay server.

How can I setup a single key for all servers in TXT records?

share|improve this question

Just use the same key for all the servers, and tell them to use the same DKIM identifier for all of them. How exactly you'll do that depends on how you set it up, but having generated and installed the keys, working out how to make them all the same should be relatively easy.

share|improve this answer
How to setup same key for all servers, in witch files i have to change. – user111175 Mar 19 '12 at 7:59
Whatever files you changed to set it up in the first place. – womble Mar 19 '12 at 8:01
I am using virtualmin for setup server. This is graphical mode. Virtualmin make changes to setup dkim this is not in my knowledge. – user111175 Mar 19 '12 at 8:07
Mentioning that in your question might have been advisable. – womble Mar 19 '12 at 8:31
Generate keys

dkim-genkey -r -d
sudo mkdir /etc/mail/dkim-milter/keys/
sudo mv default.private /etc/mail/dkim-milter/keys/
sudo mv default.txt /etc/mail/dkim-milter/keys/
sudo chown -R dkim-milter:dkim-milter /etc/mail/dkim-milter/keys/

Paste the contents of default.txt into your zone file

cat /etc/mail/dkim-milter/keys/ >> /var/named/chroot/var/named/

Can you try.

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.