Bug in Removing MX Record?

OS type and version Debian 11
Webmin version 2.0.11
Virtualmin version 7.5
Related packages BIND

Hi community,

I have just faces an issue this weekend.
Some time ago, I created accidentally a Server with Mail enabled. When I found it out, I disabled it in the VM settings of the server.
On the weekend I did a re-ckech of the system and there was an issue on this domain, that it has a MX record, but no mail. Aa/AAAA record.
So I deleted this record manually out of the DNS Records and everything worked out fine with the Re-Check.
Today I digged around a bit, and created a new domain with Mail enabled. I switched it off after it was created. The information says “Removing MX records from DNS domain”, but the MX record was still there after it.
I don’t know if this is maybe a bug in Virtualmin or it should be like this.

Thanks a lot upfront.


Hi there,

I don’t want to be pushy at all, but maybe @staff knows about it?

Thanks a lot

I tested on a Rocky System, works fine. Bug maybe OS specific.

Interesting @stefan1959 ,

thanks a lot for your answer :slightly_smiling_face:
By the way, on which Rocky System Number you’re running?
I’ll probably set-up a new server soon, based on Rocky as well.

rocky 8, but I will try 9. Just doing some testing.


I tested enabling and disabling email for a domain, and the MX record was added and removed successfully.

What hostname did the MX record point to?

Hi there,

thanks a lot for your answer.
The MX points to mail.domain.com with the priority of 5.
But somehow just the mail. A/AAAA record get’s removed.
When I disable mail and enable it again, Virtualmin will not set the A/AAAA record for mail…

Can you post the output of the command virtualmin get-dns --domain yourdomain.com before attempting to disable the email feature?

Hi @Jamie,

Sorry for the delay in getting back to you. I’ve been under the weather lately.

But I think I’ve finally found the issue. My friend’s domains are being administered by Cloudflare, which means he’s also using their nameservers (I think he’s even forced to it). But if a domain is managed by Virtualmin, everything works just as it should.

Thanks for your help and sorry for any inconvenience this may have caused.


Ok, glad you got that figured out!

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