--
-- postscreen_dnsbl_sites = bl.mailspike.net=127.0.0.[2;10;11]*2, ...
--
--- Here, the blacklist (a 'UserDomain') is \"bl.mailspike.net\", the
+-- Here, the blacklist (a 'Host') is \"bl.mailspike.net\", the
-- return code pattern is \"127.0.0.[2;10;11]\", and the weight is
-- \"2".
--
module Network.DNS.RBL.Site (
Site(..),
- Weight(..),
site_tests,
sites )
where
import Text.Parsec.String ( Parser )
import Text.Read ( readMaybe )
-import Network.DNS.RBL.Domain ( UserDomain, user_domain )
+import Network.DNS.RBL.Host ( Host, host )
import Network.DNS.RBL.IPv4Pattern ( IPv4Pattern, v4pattern )
import Network.DNS.RBL.Pretty ( Pretty(..) )
-- (DNS) name, a pattern of addresses to use for a \"hit\", and a
-- weight multiplier.
--
-data Site = Site UserDomain (Maybe IPv4Pattern) Weight
+data Site = Site Host (Maybe IPv4Pattern) Weight
-- | Pretty print DNSBL sites. This is straightforward except for the
--
site :: Parser Site
site = do
- d <- user_domain
+ d <- host
return_codes <- optionMaybe $ char '=' >> v4pattern
w <- weight
return $ Site d return_codes w