X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fharbl.git;a=blobdiff_plain;f=harbl%2Fsrc%2FNetwork%2FDNS%2FRBL%2FSite.hs;fp=src%2FNetwork%2FDNS%2FRBL%2FSite.hs;h=ef0df315d678a58782f343df2f9d9abe8a58bcef;hp=2bc63fa6e93a7113c059ff72081a7e03ebbe2179;hb=b55e5db2a68be5d69b970bbe4b5ad447881abd3d;hpb=c4d41b93ec02ff4dc762163441ebefb0324e6f07 diff --git a/src/Network/DNS/RBL/Site.hs b/harbl/src/Network/DNS/RBL/Site.hs similarity index 97% rename from src/Network/DNS/RBL/Site.hs rename to harbl/src/Network/DNS/RBL/Site.hs index 2bc63fa..ef0df31 100644 --- a/src/Network/DNS/RBL/Site.hs +++ b/harbl/src/Network/DNS/RBL/Site.hs @@ -4,13 +4,12 @@ -- -- 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 @@ -34,7 +33,7 @@ import Text.Parsec ( 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(..) ) @@ -99,7 +98,7 @@ weight = try parse_weight <|> return (Weight 1) -- (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 @@ -148,7 +147,7 @@ instance Pretty Site where -- site :: Parser Site site = do - d <- user_domain + d <- host return_codes <- optionMaybe $ char '=' >> v4pattern w <- weight return $ Site d return_codes w