Can't enable DKIM

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.4
Webmin version 1.984
Virtualmin version 6.17-3
Related packages OpenDKIM

Brand new install of Virtualmin GPL on this particular server.

When I go to DomainKeys Identified Mail and enable the Signing of outgoing mail enabled? and then it seems like it’s enabling fine but then I come back and it shows as No still there and no DKIM records are added. Originally I had DNS disabled for the domains since they are hosted in Cloudflare but then I tried enabling it to see if anything changed but it didn’t.

One of the things in the log says:
systemd[1]: opendkim.service: Can’t open PID file /run/opendkim/opendkim.pid (yet?) after start: Operation not permitted

I checked and /run/opendkim/opendkim.pid seems to be there.

Another says:
postfix/postfix-script[197990]: warning: symlink leaves directory: /etc/postfix/./makedefs.out

Not really sure if that’s an issue though.

Everything else seems pretty normal in that log. I’m not sure where else to check or what else to try since it’s always just worked for me before.

Thank you!

Did you disable Virtualmin’s DNS? I would have problems with earlier versions of Virtualmin managing DKIM if Virtualmin’s DNS was disabled, then I read that DKIM works without Virtualmin’s DNS in newer versions of Virtualmin but I still stick to my old workflow and keep Virtualmin’s DNS enabled. Never had a problem with DKIM with it enabled.

1 Like

I presume you copy the DNS txt key to cloudflare?

I then test all correct at https://mxtoolbox.com/

Steve

you should probably check your postfix chroot, seems it can’t use opendkim correctly… (opendkim user/group permissions… )

Thank you everyone for your help! I really appreciate it. It still shows as not enabled and I don’t see those boxes below with all the private and public keys and such but I dunno why.

However, it seems like it’s working now. I tested at mail-tester.com and it didn’t work but then after messing with things for awhile I tested again and it seems to work. I don’t think I actually changed anything even but it seems to work now. I did disable it and reenable it and rebooted the server and recopied the records into Cloudflare again just to be sure. Anyway now it gets a 10/10 there so woohoo!

Just not sure why it doesn’t say it’s enabled when everything seems to be the same as on a working server in the file/directory permissions and config and whatnot and no errors. Opendkim is running. I dunno. But oh well I guess. Hopefully it keeps working.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.