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

How do I use OpenDKIM with multiple domain names on a single server?

I own 3 domain names, and I have a single server that's running postfix for sending email. How do I use OpenDKIM?

Can I use the same keyfile for all 3 domain names? Do I have to create a TXT record for each domain name?

share|improve this question
Haven't used OpenDKIM (but have used dkim-milter) - I find DKIMProxy to be easier to setup than a milter. In general, you do need a TXT record for every domain that you wish a recipient to verify and you can use the same keyfile for all (although it is preferable for each domain to have its own keyfile). The configuration of OpenDKIM can be found on its site. – cyberx86 Aug 2 '11 at 4:26

1 Answer 1

You'll need to set up a KeyTable with a separate line for each selector/domain/keyfile. It would look like this:

then a SigningTable to determine who can sign on each domain:


Here's an easy How-To for setting it up:

share|improve this answer
Thanks SteveJ! Is it allowed to use the same default.private key for all 3 domains? Or does that invalidate or confuse the authentication process? – Nic Cottrell Mar 30 '12 at 9:36
If you are using subdomains of the same domain, you can just specify Subdomains yes in /etc/opendkim.conf – David Xia Mar 6 '13 at 22:59

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.