]> gitweb.michael.orlitzky.com - dead/harbl.git/blobdiff - src/DnsblSite.hs
Add more documentation and a pretty-printer to IPv4Pattern.
[dead/harbl.git] / src / DnsblSite.hs
diff --git a/src/DnsblSite.hs b/src/DnsblSite.hs
new file mode 100644 (file)
index 0000000..df4437d
--- /dev/null
@@ -0,0 +1,18 @@
+-- | This module contains the 'DnsblSite' data type representing one
+--   blacklist with its associated return codes and multiplier. For example,
+--   in Postfix's main.cf you might have,
+--
+--     postscreen_dnsbl_sites = bl.mailspike.net=127.0.0.[2;10;11]*2, ...
+--
+--   Here, the 'Domain' is \"bl.mailspike.net\", the return code
+--   pattern is \"127.0.0.[2;10;11]\", and the multiplier is \"2".
+--
+module DnsblSite
+where
+
+import IPv4Pattern ( IPv4Pattern )
+
+newtype Domain = Domain String
+newtype Multiplier = Multiplier Int
+
+data DnsblSite = DnsblSite Domain IPv4Pattern Multiplier