Isn't this the correct format:
domain.tld. IN A xxx.xxx.xxx.xxx
mail IN A xxx.xxx.xxx.xxx
domain.tld. IN MX 5 mail.domain.tld.
domain.tld. IN TXT "v=spf1 a mx a:domain.tld. ip4:xxx.xxx.xxx.xxx ?all"
Yet when saving I get: Failed to save DNS records : Validation failed : This domain has email enabled, but none of the MX records point to it. Either the MX records should be corrected, or the email feature disabled if mail is hosted externally.
I can send mail just fine, iptables is ok and ports 25, 110, 143 are listened. DNS works fine otherwise (website works).
I'm using OVH Hosting's Kimsufi dedicated server. The mail worked OK with OVH's automatically generated domain before I assigned a proper domain.
I have to say I have been impressed with Virtualmin/Webmin and how easy and clear everything is to set up. It takes a lot of the pain away from getting into new things without obstructing learning.