Skip to content

lookup_ptr

kumo.dns.lookup_ptr(IP)
Since: Dev Builds Only

The functionality described in this section requires a dev build of KumoMTA. You can obtain a dev build by following the instructions in the Installation section.

Resolve PTR records for the requested IP.

Raises an error if there was an issue resolving the record.

Returns a lua array-style table with the list of PTR records returned from DNS. The table may be empty.

local ok, records = pcall(kumo.dns.lookup_ptr, '127.0.0.1')
if ok then
  for _, a in ipairs(records) do
    print(a)
  end
end