How do I enable DKIM Options for my virtual hosts?


How do I enable the DKIM Options for each virtual server?

I have been digging into how virtualmin configures opendkim for ubuntu 12.04LTS. I began writing this post with a laundry list of issues, but then I just tried to click “save” for enabling dkim under “Email Messages | DomainKeys Identified Mail” and it worked. To a point. The only dkim options set up were:

Domain /etc/dkim-domains.txt
KeyFile /etc/dkim.key
Selector 2015

I know how to do dkim signing for virtual domains. I will need the following entries which will nullify the previous entries:

I have spent some time trying to find the domain-specific dkim setups. I saw in this post these instructions:
Virtualmin > [any domain] > Server Configuration > DKIM Options
(btw: this part isn’t in the documentation.

I remembered in the dkim documentation the paragraph:
Only virtual servers that have both the DNS and email features enabled will have DKIM activated, as the mail server needs to be setup to use a private signing key whose corresponding public key is added to DNS.
And I had this thought: I do not have my virtualmin installation managing my dns: I am managing it elsewhere. Is this the same reason I don’t see the “DKIM Options” menu item under a domain?

I LOVE the “suggested DNS records” menu item, it would dovetail perfectly if I could enable or use the DKIM Options as mentioned above.

I CAN enable signing virtual domains by hand at the command line, but my original opendkim setup got clobbered by an update.

I would like to be able to enter my own dkim keys, but once the keyfile/keytable entries are in place I can do that at the command prompt.

Thank you for your time!


Set your DKIM manually.

Hello Diabolico,

When I read this, I went back to virtualmin to see if there was a manual option. Now I see you mean I should do it via the method I already know and bypass the gui.

I did that a couple of months ago, and yesterday found that my configuration had been stepped on and overwritten. I think a virtualmin update did it, probably something I clicked ok on.

I want to avoid having virtualmin stepping on my configuration. Do you have any suggestions about how I can tell virtualmin to stay out of it?


Avoid clicking anything DKIM related in Virtualmin. Aside of this i dont know any other way but maybe one of Virtualmin guys could jump in and share some ideas.


that makes sense. I also added an administrator’s note regarding the hack.