[SERVER TEMPLATE] Default SPF settings are too basic

There is just a yes/no toggle, with "no", or "yes (with ip of server)"

Neither are correct in all cases. In my case, I've offloaded SPF to a central mail server, and use include: directives.

There needs to be a third option: SPF: No. SPF: Yes (With IP of server). SPF: Yes (Custom) [edit field where user can type their own SPF=v1 etc etc string]

Either way I solved it (and many other issues) by simply defining the entire default DNS zone file instead of letting Virtualmin add entries on system creation.

Status: 
Active

Comments

Virtualmin has much more than a simple yes/no option for SPF - at Server Configuration -> DNS Options you can edit pretty much all of the SPF tags (like allowed IPs and domains).

I think the original ticket is speaking about the Server Templates -> BIND DNS Domain. That thing only shows me "No" and "Yes, with server's IP address" and there needs to be a "Yes" (custom) mode that doesn't forcibly add the server's IP.

If you want more control over the SPF record in the template, you can use the "BIND DNS records for new domains" field to add a line like :

@  IN  TXT  "v=spf1 etc..."

This template can use variables like $DOM and $IP that will get replaced with the domain name and IP when a virtual server is created.