Extend email address validation by is_email

The following code returns true:

select is_email('john.doe@acme.c')

The right email address should have had TLD ch for Switzerland instead of c.

Is it possible to extend the validation (optionally) to also check for the TLD validity such as contained in data.iana.org/TLD/tlds-alpha-by-domain.txt?

Or to add a SQL function to perform a DNS lookup for existance of an MX record?

Starting release 24.0.400, is_email will by default check against the current list of TLD’s whether it is valid.

To revert to pre-24.0.400 behaviour, please specify the third parameter as false.

Dit topic is 3 dagen na het laatste antwoord automatisch gesloten. Nieuwe antwoorden zijn niet meer toegestaan.