modify-dns

Change DNS settings for virtual servers

This program updates DNS-related options for one or more servers, selected using the --domain or --all-domains flags. Or you can select all domains that don't have their own private IP address with --all-nonvirt-domains.

To enable SPF for a domain, using --spf option, and to turn it off use --no-spf. By default, the SPF record will be created using the settings from the DNS section of the domain's server template.

To add allowed hostname, MX domains or IP addresses, use the --spf-add-a, --spf-add-mx and --spf-add-ip4 options respectively. Each of which must be followed by a single host, domain or IP address.

Similarly, the --spf-remove-a, --spf-remove-mx and --spf-remove-ip4 options will remove the following host,
domain or IP address from the allowed list for the specified domains.

To control how SPF treats senders not in the allowed hosts list, use one of the --spf-all-disallow, --spf-all-discourage, --spf-all-neutral, --spf-all-allow or --spf-all-default parameters.

This command can also be used to add and remove DNS records from all the selected domains. Adding is done with the --add-record flag,
which must be followed by a single parameter containing the record name, type and value. Similarly, deletion is done with the --delete-record flag,
followed by a single parameter containing the name and type of the record(s) to delete. Both of these can be given multiple times.

Similarly, the default TTL for records can be set with the --ttl flag followed by a number in seconds. Suffixes like h, m and d are also allowed to specific a TTL in hours, minutes or days.

You can also add or remove slave DNS servers for this domain, assuming that they have already been setup in Webmin's BIND DNS Server module. To add a specific slave host, use the --add-slave flag followed by a hostname. Or to add them all, use the --add-all-slaves flag. To remove a single slave host, use the --remove-slave command followed by a hostname.

Command Line Help

virtualmin modify-dns --domain name | --all-domains | --all-nonvirt-domains
                     [--spf | --no-spf]
                     [--spf-add-a hostname]*
                     [--spf-add-mx domain]*
                     [--spf-add-ip4 address]*
                     [--spf-remove-a hostname]*
                     [--spf-remove-mx domain]*
                     [--spf-remove-ip4 address]*
                     [--spf-all-disallow | --spf-all-discourage |
                      --spf-all-neutral | --spf-all-allow |
                      --spf-all-default]
                     [--add-record "name type value"]
                     [--remove-record "name type"]
                     [--ttl seconds]
                     [--add-slave hostname]* | [--add-all-slaves]
                     [--remove-slave hostname]*