Skip to content

Reversed behavior of DnsBlocklist "strict" mode #132

@NicolasLM

Description

@NicolasLM

DnsBlocklist.get defaults to being not strict, meaning that unresponsive blacklists should not be considered as having an entry.

In practice however, DNS errors happening while querying the blacklist will result in the entry being present. This likely comes from the not in slimta.util.dnsbl:

try:
    DNSResolver.query(query, 'A').get()
except DNSError as exc:
    if exc.errno == ARES_ENOTFOUND:
        return False
    logging.log_exception(__name__, query=query)
    return not strict
else:
    return True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions