Adding a local dns setup when the domain is already in cloudflare

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.2
Webmin version 2.303
Virtualmin version 7.30.8 Pro
Webserver version Apache/2.4.58 (Ubuntu)
Related packages SUGGESTED

More of a Domainkeys query than an issue

I have a domain hosted in Google for mail, etc and local machines in our office which send error messages, etc, out via SMTP, These messages mainly go into the spam folders, which, of course, is not optimal. I put the DNS for that domain in Cloudflare before the update to VM, which enabled sync. I HAVE added the domain in question to the DKIM settings as an extra domain to sign for, and I have added the “offsite hosting key” to our DNS at CloudFlare, but I am still getting issues.

I now want to link the Cloudflare DNS with the Virtualmin DNS (to make things easier), but am getting an error, which is completely sane, but is stopping me from doing what I want, which is to re-link the Cloudflare DNS provision for the domain with my Virtualmin. The error is:-

" Failed to modify server: DNS zone already exists on cloud provider Cloudflare DNS"

I get it, Virtuamin is complaining because the domain is already there, I guess I could delete the Cloudflare DNS add DNS to the local Virtual Server and rebuild the by hand locally?

Is this the only way to proceed? Of course, I would rather not disable DNS and then rebuild if I can just import, any help or suggestions or just tell me to rip the DNS down and rebuild, which is also OK, but I am a bit lazy.

BUT Everything is working nicely, I have the CloudFlare API stuff working for SSL and other (DNS) management, so overall I am super happy with my 7.30.8 Pro and how it integrates with Cloudflare.

I realise i need a little more information for this to make sense - i have a proxmox virtualisation setup internally and have set all the machines to send mail via my virtualmin server which then just punts them off to the internet - in particular me at google - but all the messages that go via the virtualmin machine do not seem to be DKIM safe - or at leas that is what my testing has shown. SO virtualmin as a proxy that adds DKIM is what i was trying to do.

Perhaps you should rephrase it to smarthost or relay instead of proxy and then Google and the AI engines will give you relevant stuff.

It can certainly be done, this thing that you are trying to do.

You’re right—the error is expected, but frustrating. You can delete the Cloudflare zone temporarily, sync with Virtualmin, then re-enable Cloudflare—but yeah, it’s not ideal.

1 Like

I’ll probably just backup the cloudflare link it and quickly reconfigure it… mainly worried about bounced mail… I wonder if i can set up the local DNS and then turn on CloudFlare sync… let me see… that way downtime would be minimal.

Sounds like a solid plan—setting up local DNS first, then syncing should definitely help minimize downtime and avoid mail issues.