From: Michael Tremer Date: Wed, 31 Dec 2025 16:56:52 +0000 (+0000) Subject: exporter: Add some metadata to the apex X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b6a47d38301e6a89efe40783a9d00e223edba78;p=dbl.git exporter: Add some metadata to the apex Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/exporters.py b/src/dnsbl/exporters.py index 7408289..d29283c 100644 --- a/src/dnsbl/exporters.py +++ b/src/dnsbl/exporters.py @@ -202,6 +202,21 @@ class ZoneExporter(TextExporter): # XXX Add NS f.write("@ IN NS master.lwldns.net.\n") + # Add the update timestamp (in human-readable format) + if self.list.updated_at: + f.write("@ IN TXT \"updated-at=%s\"\n" % self.list.updated_at.isoformat()) + + # Add the license + if self.list.license: + f.write("@ IN TXT \"license=%s\"\n" % self.list.license) + + # Add the description + if self.list.description: + f.write("@ IN TXT \"description=%s\"\n" % self.list.description) + + # Add total domains + f.write("@ IN TXT \"total-domains=%s\"\n" % len(self.list)) + # Write all domains for domain in self.list.domains: for prefix in ("", "*."):