A DNS whitelist is a collection of SMTP and email servers that are considered safe to exchange emails with. This list is used for email filtering purposes, allowing a system to block emails received from illegitimate or spam email servers. It's used to decrease the number of spam emails a user receives.
A DNS whitelist works when a domain name server is configured with a list of trusted mail servers and domains. When an email is received at the configured server, the SMTP listener utility matches the domain or its IP address with the list of approved mail servers/email providers. If a match is found, the email is forwarded to the corresponding email address inbox. However, if there is no match, the email is sent to the spam folder or is deleted altogether.