Subdomain MX records (SKINS) (API)

Version 1.44.0


Ability to specify a subdomain for an MX name. Enbaled by default, set internally: full_mx_records=1 to disable it, set it to 0 in the directadmin.conf and restart DA. ---------------- This will add a 3rd variable to the skins called mx_value, for the actual smtp server field. This also means that the "name" is going to be the domain part on the left, as it should have been originally, instead of the smtp server, like before. The value remains the number. If no mx_value is passed, DA will notice and assume it's an old skin, so the "name" would be used as the smtp server (right part after the number). ==================== API: Retrieval and submissions will remain in the old method, fully backwards compatible.. where the "name" is the smtp server, and the "value" is only the number. However, if you include: full_mx_records=yes in your requests, then DA will give you the "name" as the domain/subdomain (left) and the value will be the combined "10", with the number and domain together. For deletion, you can delete MX records with either the old or new format, DA will figure it out for you. Clearly, if the value is just a number, you're using the old method and DA will handle is accordingly. ==================== SCRIPTS: the MX variable will still hold the older mail=10 format, so it's backwards compatible. However, a new variable will show up full_mx_records is on: MX_FULL which will old mail eg: echo $MX_FULL gives you, eg: mail& while: echo $MX gives you: mail=10& ==================== SKINS: ------- admin/dns_admin_control.html The MX name now looks like: <input type=text name=name |*if HAVE_FULL_MX_RECORDS="1"|value='|DOMAIN|.'|*endif|> Immediately after the select box, add: |*if HAVE_FULL_MX_RECORDS="1"| <input type=text name=mx_value size=18> |*endif| ------- user/dns_control.html Getting things into this one is ugly, because the form is already within an |*if| and it doesn't support double embedded ifs.. as such, we need this: |?FULL_MX_NAME=| |?FULL_MX_VALUE=| |*if HAVE_FULL_MX_RECORDS="1"| |?FULL_MX_NAME=`domain`.| |?FULL_MX_VALUE=<input type=text name=mx_value size=18>| |*endif| and then make the MX name: <input type=text name=name value="|FULL_MX_NAME|" |DNS_DISABLED|> and right after the </select> add: |FULL_MX_VALUE| --------- user/dns_mx_control.html changes similar to dns_admin_control.html

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