--
-- 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 weight is \"2".
+-- Here, the blacklist (a 'UserDomain') is \"bl.mailspike.net\", the
+-- return code pattern is \"127.0.0.[2;10;11]\", and the weight is
+-- \"2".
--
-module DnsblSite
+module DnsblSite ()
where
import Text.Parsec (
import Text.Parsec.String ( Parser )
import Text.Read ( readMaybe )
-
+import Domain ( UserDomain )
import IPv4Pattern ( IPv4Pattern )
newtype Weight = Weight Int deriving (Eq, Show)
Nothing -> unexpected "weight: readMaybe failed on a sequence of digits!"
Just k -> return $ Weight (if sign == '-' then negate k else k)
-newtype Domain = Domain String
-
-data DnsblSite = DnsblSite Domain IPv4Pattern Weight
+data DnsblSite = DnsblSite UserDomain IPv4Pattern Weight