View Source z_email_dnsbl (zotonic_stdlib v1.22.0)

Check an IP address against some DNSBL providers (rfc5782)

Summary

Functions

Default list of DNSWL services
Default list of DNSBL services
Check if the IP address is on one of the default blocklists.
Check if the IP address is on one of the given blocklists.
Check if the IP address is on one of the given blocklists and not on one of the white lists. If an IP address is white listen then this routine always return true.
Check the block- or allowlist status of an IP address. If it is blocked then the blocklists where the IP address is blocked are returned.
Check the block- or allowlist status of an IP address with the given block lists. If it is blocked then the blocklists where the IP address is blocked are returned.
Check the block- or whitelist status of an IP address with the given block- and whitelists. If it is blocked then the blocklists where the IP address is blocked are returned.

Functions

-spec dns_allowlist() -> [string()].
Default list of DNSWL services
-spec dns_blocklist() -> [string()].
Default list of DNSBL services
-spec is_blocked(inet:ip_address()) -> boolean().
Check if the IP address is on one of the default blocklists.
-spec is_blocked(inet:ip_address(), [string()]) -> boolean().
Check if the IP address is on one of the given blocklists.
Link to this function

is_blocked(IP, RTBLs, WLs)

View Source
-spec is_blocked(inet:ip_address(), [string()], [string()]) -> boolean().
Check if the IP address is on one of the given blocklists and not on one of the white lists. If an IP address is white listen then this routine always return true.
-spec status(inet:ip_address()) -> {ok, notlisted | allowed | {blocked, [string()]}}.
Check the block- or allowlist status of an IP address. If it is blocked then the blocklists where the IP address is blocked are returned.
-spec status(inet:ip_address(), list()) -> {ok, notlisted | allowed | {blocked, [string()]}}.
Check the block- or allowlist status of an IP address with the given block lists. If it is blocked then the blocklists where the IP address is blocked are returned.
Link to this function

status(IP, DNSBLs, DNSWLs)

View Source
-spec status(inet:ip_address(), list(), list()) ->
          {ok, {blocked, list()}} | {ok, notlisted} | {ok, allowed}.
Check the block- or whitelist status of an IP address with the given block- and whitelists. If it is blocked then the blocklists where the IP address is blocked are returned.