MX record templates (SKINS)(TEMPLATES)

Version 1.56


Users can pick google/zoho from a list, to remove their MX records and replace them with the values in the template. New item at the bottom of the page: CMD_DNS_MX? "Set remote MX records" Enabled by default in the directadmin.conf: mx_templates=1 to disable it, set: mx_templates=0 and restart directadmin. Note: It does not change the "Local Mailserver" checkbox, this is still manually controlled. ==================== TEMPLATES new directory: /usr/local/directadmin/data/templates/mx with 2 default templates: Containing their default MX record settings for those services. The top will also set: |?NAME=Google Suite MX| To give the select box a human readable name, but the selected value in the form is still ==================== CUSTOM TEMPLATES You can add more .txt files into the templates/mx directory (in theory they could be overwritten if we ever "happen" to include files with those names), but if you want to override the 2 .txt files.. or just add more in a more clear way, this is the custom mx templates path: /usr/local/directadmin/data/templates/mx/custom/ ==================== SKIN user/dns_mx_control.html uses the token check, representing the mx_tokens=1 directadmin.conf value: |*if MX_TEMPLATES="1"| The |MX_TEMPLATES_SELECT| token contains the selectbox for the available templates, plus "default" to revert the User back. =================== POSTING CHANGES CMD_DNS_MX | CMD_API_DNS_MX method: POST action=mx_template||default =================== JSON CMD_DNS_MX? will return one new entry if mx_templates=1 is enabled in the directadmin.conf. If it's not present, then it's either shut off, or an older directadmin version. "mx_templates": { "mx_templates_select": { "0": { "selected": "yes", "text": "-- Select MX Template --", "value": "..." }, "1": { "text": "Revert to Local Default", "value": "default" }, "2": { "text": "Google Suite MX", "value": "" }, "3": { "text": "Zoho Mail", "value": "" } } }

Interested to try DirectAdmin? Get a 30-day Free Trial!