DKIM Not working

When my Virtualmin installation only hosted one site, I installed DKIM. When I test DKIM for this first domain with it shows DKIM is working on test emails.

I added a few sites to the installation and tested again. Mail from these new sites comes back as none for a DKIM signature.

I tried installing DKIM again and rebooting the VPS with the same result. The DNS records for the new domains shows a text record with the correct DKIM key.

Any ideas what I a doing wrong?

I fixed this! As I know these forum posts are well indexed by Google, I’ll post the solution so that other may find it and solve their own problems.

Everything appeared to be installed correctly on Virtualmin, the keys generated and added to the DNS records. A contractor I use suggested adding an internal hosts file specifically listing the IP of the VPS. I edited dkim-filter.conf to reference a hosts file, I then restarted the dkim-milter daemon and DKIM now works according to the verifier at

Just to be clear before my fix, the verifier reported “none” for DKIM and afterwards it reports “pass.”