latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

Mail
Mail DNS Settings

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.

get/validate_current_ptrs

Query parameters

domainstring required

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.

Response

HTTP Request was successful.

Example response

{
  "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
  }
}