Skip to content

kumo.string.psl_domain_is_known

kumo.string.psl_domain_is_known(STRING)
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.

Check whether the registrable domain's public suffix is explicitly listed in Mozilla's Public Suffix List.

Returns true when the input is a registrable domain whose public suffix is explicitly listed, or false when the suffix was derived from an unlisted label, or when the input has no registrable domain.

assert(kumo.string.psl_domain_is_known 'www.example.com' == true)
assert(kumo.string.psl_domain_is_known 'domain.invalid' == false)
assert(kumo.string.psl_domain_is_known 'com' == false)