MX-records created only on second attempt to enable Mail

This issue might be specific to CentOS 7 Virtalmin as I don't remember the same happened on CentOS 6.5 based Virtualmin systems.

When editing a virtual server and enabling Mail options MX record In DNS zone for the respective virtual server never gets created. Only SPF-record is there:

domain.com. IN TXT "v=spf1 a mx domain.com ip4:54.59.80.117 -all"

We have to disable and re-enable Mail and only then, on second, attempt, the proper MX records get created:

domain.com. IN TXT "v=spf1 a mx domain.com ip4:54.59.80.117 -all"
domain.com MX - Mail Domain 5 mail.domain.com.
Status: 
Active

Comments

That's odd - do you have any custom records defined at System Settings -> Server Templates -> Default Settings -> BIND DNS domain?

No, everything on that page is on default.

Have you tested this on CentOS 7 based Virtualmin? Please do so and you'll see.

The behavior shouldn't be depend on which Linux distribution you have - the Virtualmin code is the same regardless.

Is there anything unusual about this domain? For example, is it a sub-domain, or an alias of another domain?