Skip to content

kumo.dns.lookup_txt(DOMAIN)

Since: Version 2024.09.02-c5476b89

The functionality described in this section requires version 2024.09.02-c5476b89 of KumoMTA, or a more recent version.

Resolve a TXT record for the requested DOMAIN.

Raises an error if the domain doesn't exist.

Returns a lua array-style table with the list of txt records returned from DNS.

assert(
  kumo.serde.json_encode(kumo.dns.lookup_txt 'gmail.com')
    == '["v=spf1 redirect=_spf.google.com","globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="]'
)