DKIM configuration

SYSTEM INFORMATION
OS type and version CENOS 9
Virtualmin version 7.30.8

I went in virtualmin and set it to sign outgoing However I noticed that it was not signing.

The log would give
no signing domain match for ‘mydomain.com

Looking in /etc/opendkim.conf, I saw:
Domain /etc/dkim-domains.txt

However it doesnt seem correct.
I tried:
Domain mydomain.com

Then everything started working

Is this a bug? or am I doing something wrong?

That’s how mine is on Debian 11 with /etc/dkim-domains.tx listing ALL domains to sign for. Did you check the /etc/dkim-domains.txt to see if mydomain.com was listed there?

1 Like

Not sure that centos 9 would be the same and it’s not a grade A (as far as virtualmin is concerned) OS so the op may run in to other issues

1 Like

It’s the same on EL distros (which CentOS no longer is, and you’re right it’s not supported, but in this case it should work the same as everywhere else).

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.203
Virtualmin version 7.30.8
Theme version 23.03
Apache version 2.4.52
Package updates All installed packages are up to date

I use an external registry and DNS
all records are correct, and mxtoolbox says SPF, DMRAC, DKIM are correct



but no outbound emails are signed.

in /etc/dkim-domains.txt i have:
server.domain.com
domain.com

then in opendkim.conf, i have
Domain /etc/dkim-domains.txt
Selector 202200
KeyFile /etc/dkim.key

which matches the key file, and hence mxtoolbox says its all good.

then hit save:
"Finding virtual servers to enable DKIM for ..
.. no virtual servers with DNS and email enabled were found, but enabling for 2 extra domains

Extracting public key from private key in /etc/dkim.key ..
.. done

Setting domain and selector in DKIM filter configuration ..
.. done

Enabling DKIM filter at boot time ..
.. done

Starting DKIM filter ..
.. done

Configuring mail server to use DKIM filter ..
.. done
"

ideas? the setting doesnt make sense as external DNS, but still says “but enabling for 2 extra domains”

but no external signature, as verified with https://dkimvalidator.com/

I have had no issue, try

tried them both, no difference. They used to work, maybe an update over the last year changed things. are we certain that an external Registra / DNS config, not using Webmin / Virtualmin BIND at all - will DKIM still work ?

Oh WOW. I just got it to work. I disabled DKIM, then re-enabled it, and this fixed ! must have been an update, like others have mentioned, over time the domains dissappeared in the “Extra domains to sign for”, and re-entering the domains by themselves does not work, you have to disable, then re-enable wqith “Signing of outgoing mail enabled”

1 Like