Validate domain PTR records

This function validates the pointer records (PTR) for IPv4 and IPv6 addresses an account's domains send mail from. It retrieves the PTR records for each IP address and determines which of the domain's IP addresses send mail. It then validates the PTR records for each IP address and validates the A (IPv4) or AAAA (IPv6) records pointing to each domain. This function also ensures that at least one of that domain's A or AAAA records points back to the IP address.

SecurityBasicAuth
Request
query Parameters
domain
required
string

The domain for which to validate the PTR records.

Note:

To check multiple domains, duplicate or increment the parameter name. For example, use the domain-1, domain-2, and domain-3 parameters.

Examples:
domain=domain-1=example.com domain-2=example2.com domain-3=example3.com
domain=domain=example.com&domain=example2.com&domain=example3.com
domain=example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/validate_current_ptrs
Request samples
whmapi1 --output=jsonpretty \
  validate_current_ptrs \
  domain='example.com'
Response samples
application/json
{
  • "data": {
    • "payload": [
      • {
        • "arpa_domain": "1.0.0.10.in-addr.arpa",
        • "domain": "example.com",
        • "helo": "example.com",
        • "ip_address": "10.0.0.1",
        • "ip_version": 4,
        • "nameservers": [
          • "ns1.example.com",
          • "ns2.example.com",
          • "ns3.example.com"
          ],
        • "ptr_records": [
          • {
            • "domain": "example.com",
            • "forward_records": [
              • "10.0.0.1"
              ],
            • "state": "VALID"
            }
          ],
        • "state": "VALID"
        },
      • {
        • "arpa_domain": "3.0.0.10.in-addr.arpa",
        • "domain": "example.com",
        • "helo": "example.com",
        • "ip_address": "10.0.0.3",
        • "ip_version": 4,
        • "nameservers": [
          • "ns1.example.com",
          • "ns2.example.com",
          • "ns3.example.com"
          ],
        • "ptr_records": [
          • {
            • "domain": "example.com",
            • "forward_records": [
              • "192.168.12.34"
              ],
            • "state": "FWD_MISMATCH"
            }
          ],
        • "state": "PTR_MISMATCH"
        },
      • {
        • "arpa_domain": "4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa",
        • "domain": "example.com",
        • "helo": "example.com",
        • "ip_address": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
        • "ip_version": 6,
        • "nameservers": [
          • "ns1.example.com",
          • "ns2.example.com",
          • "ns3.example.com"
          ],
        • "ptr_records": [
          • {
            • "domain": "example.com",
            • "forward_records": [
              • "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
              ],
            • "state": "VALID"
            }
          ],
        • "state": "VALID"
        },
      • {
        • "arpa_domain": "2.0.0.10.in-addr.arpa",
        • "domain": "example.com",
        • "helo": "example.com",
        • "ip_address": "10.0.0.2",
        • "ip_version": 4,
        • "nameservers": [
          • "ns1.example.com",
          • "ns2.example.com",
          • "ns3.example.com"
          ],
        • "ptr_records": [ ],
        • "state": "MISSING_PTR"
        },
      • {
        • "domain": "thisotheremaildomain.com",
        • "error": "1.1.1.1.1 is not a valid IP address.",
        • "helo": "thisothermaildomain.com",
        • "ip_address": "1.1.1.1.1",
        • "ptr_records": [ ],
        • "state": "ERROR"
        },
      • {
        • "arpa_domain": "4.0.0.10.in-addr.arpa",
        • "domain": "example.com",
        • "helo": "example.com",
        • "ip_address": "10.0.0.4",
        • "ip_version": 4,
        • "nameservers": [
          • "ns1.example.com",
          • "ns2.example.com",
          • "ns3.example.com"
          ],
        • "ptr_records": [
          • {
            • "domain": "example.com",
            • "forward_records": [ ],
            • "state": "MISSING_FWD"
            }
          ],
        • "state": "PTR_MISMATCH"
        }
      ]
    },
  • "metadata": {
    • "command": "validate_current_ptrs",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}