Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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 example.com
sudo mkdir /etc/mail/dkim-milter/keys/example.com
sudo mv default.private /etc/mail/dkim-milter/keys/example.com/default
sudo mv default.txt /etc/mail/dkim-milter/keys/example.com/
sudo chown -R dkim-milter:dkim-milter /etc/mail/dkim-milter/keys/example.com

Paste the contents of default.txt into your zone file

cat /etc/mail/dkim-milter/keys/example.com/default.txt >> /var/named/chroot/var/named/example.com.hosts

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.