DKIM error When sending

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Webmin version 2.111
Usermin version 2.010
Virtualmin version 7.10.0
Theme version 21.10
Package updates All installed packages are up to date

When I do the DKIM test from mxtoolbox, it passes, but then when I send, it fails.

The second screenshot, what service is producing that?
The only thing that I can think without seeing information is the selector is not matching.

the second screenshot is from “DKIM Test - DKIM Verify - DKIM Validator

the selector is matching

Where are you managing your dns ? Virtualmin or a 3rd party ?

this error shows a different selector
image

you are sending via virtualmin? If you are thats some sort of bug.

Did you list the domain in the Extra domains to sign for if its not the main hostname. Not sure how you would get a different dkim though. Do you know the selector name that is erroring?

i am using godaddy and it works with other domains

this was the old selector and i have changed it but it still shows the old one

1 Like

Did you make sure that the dkim record was vaild when you copied it to godaddy ?

is the domain listed, maybe its some sort of cache, have you restarted postfix.

yes i restarted postfix

The error is the signing of the email using the old selector and key I guess, the dns is ok as what I’m reading.

the config files are in the etc, check them for the old selector

image

yes, and i have tried to get a new dkim but still not working

You don’t need FQDN (well I’ve never) like ‘’‘mail.d-conf.com’‘’ you just need the domain names ‘’‘d-conf.com’‘’. The second line mail is not a domain and is not needed.
But I can’t see that effecting the selector.

yes, i found it

should i change it from there?

Back it up first. Let me look in mine.

Maybe it the OS config is different, what file are you looking in dkim.keytable?

Mine looks like this
image

i am using WinSCP to check the files

image

do you know how to get a new DKIM private key ?

No because you using a different OS (I’m on Rocky9)
The selector 6060 should really be in the conf file somewhere as virtualmin is reading it from somewhere. So I’m at a bit of a loss.
Getting late here I have to go.

no worries,
thanks for your patience, i really appreciate it

1 Like

I did a quick install on your OS and got a domain configured.
I could not find dkim-keytable

image

I found the selector in the opendkim.conf
Maybe this will help you. So what I “think” is the dkim-keytable is overriding the opendkim.config
You could try and comment out the Keyfile line, don’t delete the line. (SigningTable may need to be commented out too.)
restart the service systemctl restart opendkim
and see if that fixes the issue.

image

My Rocky config