new(DNSBL)
new(DNSBL, MATCHRECORD[, ...])
new(DNSBL, SUBREF)
Creates a ConnectDNSBL object. DNSBL is the root host hierarchy to use for lookups. Three methods
of matching can be used:
If no additional arguments are provided, the match succeeds if there is any address entry present for
the DNSBL lookup; the values are not examined.
If one or more MATCHRECORD values are supplied, they are string representations of IPv4 addresses.
If any of these match record values is the same as any address record returned by the DNSBL lookup,
the match succeeds.
If a SUBREF (reference to a subroutine; may be an anonymous inline "sub{}") is supplied, it is called
for each of the address records returned by the DNSBL lookup. The subroutine should return 0 or
undef to indicate a failed match, and nonzero to indicate a successful match. The subroutine
receives a binary-encoded four byte scalar that should be transformed as needed with "inet_ntoa()" or
"unpack".
accept_match(FLAG)
If FLAG is 0 (the default), a matching DNSBL will cause the connection to be rejected.
If FLAG is 1, a matching DNSBL will cause this module to return SMFIS_ACCEPT instead. This allows a
"ConnectDNSBL" to be used inside a "Mail::Milter::Chain" container (in accept_break(1) mode), to
function as a whitelist rather than a blacklist.
This method returns a reference to the object itself, allowing this method call to be chained.
ignore_tempfail(FLAG)
If FLAG is 0 (the default), a DNSBL lookup which fails the underlying DNS query will cause the milter
to return a temporary failure result (SMFIS_TEMPFAIL).
If FLAG is 1, a temporary DNS failure will be treated as if the lookup resulted in an empty record
set (SMFIS_CONTINUE).
This method returns a reference to the object itself, allowing this method call to be chained.
set_message(MESSAGE)
Sets the message used when rejecting connections. This string may contain the substring %A, which
will be replaced by the matching IPv4 address, or %L, which will be replaced by the name of the
matching DNSBL.
This method returns a reference to the object itself, allowing this method call to be chained.