From: Michael Tremer Date: Mon, 22 Dec 2025 12:44:21 +0000 (+0000) Subject: sources: Add some ignored domains X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2210b9826dc72558ac4475744ede9528446ac99f;p=dbl.git sources: Add some ignored domains These will never be added to any list Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index a8269b9..8571d2b 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -41,6 +41,10 @@ HOST_PREFIXES = set(( "::1 ", )) +IGNORED_DOMAINS = set(( + "localhost", +)) + class Format(enum.Enum): PLAIN = 1 HOSTS = 2 @@ -240,6 +244,11 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): log.warning(_("Skipping invalid domain: %s") % domain) continue + # Skip any special domains + if domain in IGNORED_DOMAINS: + log.debug("Skipping ignored domain: %s" % domain) + continue + # Add the domain domains.add(domain)