mail-reports-0.3.0.0: A parser library for DMARC and SMTP TLS reports
Safe HaskellNone
LanguageHaskell2010

Data.Mail.DMARC.Reports

Description

Utilities for parsing a DMARC aggregated report, following RFC 7489. These functions also handle decompression (gzip or pkzip)

Synopsis

Parsers

dmarcFeedbackFromStrict :: ByteString -> Maybe Feedback Source #

Parse a DMARC report from a strict ByteString

dmarcFeedbackFromLazy :: ByteString -> Maybe Feedback Source #

Parse a DMARC report from a lazy ByteString

dmarcFeedbackFromXml :: Element -> Maybe Feedback Source #

Parse a DMARC report from an XML document

Data types

data Record Source #

Constructors

Record 

Instances

Instances details
Eq Record Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Methods

(==) :: Record -> Record -> Bool #

(/=) :: Record -> Record -> Bool #

Read Record Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Show Record Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

data Row Source #

Instances

Instances details
Eq Row Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Methods

(==) :: Row -> Row -> Bool #

(/=) :: Row -> Row -> Bool #

Read Row Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Show Row Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Methods

showsPrec :: Int -> Row -> ShowS #

show :: Row -> String #

showList :: [Row] -> ShowS #

data DkimAuth Source #

Constructors

DkimAuth 

Instances

Instances details
Eq DkimAuth Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Read DkimAuth Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Show DkimAuth Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

data SpfAuth Source #

Constructors

SpfAuth 

Instances

Instances details
Eq SpfAuth Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Methods

(==) :: SpfAuth -> SpfAuth -> Bool #

(/=) :: SpfAuth -> SpfAuth -> Bool #

Read SpfAuth Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

Show SpfAuth Source # 
Instance details

Defined in Data.Mail.DMARC.Reports

data AuthResult Source #

Constructors

NoAuth

no policy published

AuthPass

successful authentication

AuthFail

authentication failed

TempError

temporary error in resolving the policy

PermError

permanent error in resolving the policy

AuthNeutral

??? (DKIM only)

AuthPolicy

??? (DKIM only)

SoftFail

auth failed, but won't reject (SPF only)

Utility

uncompressString :: ByteString -> ByteString Source #

Uncompress gzip or pkzip bytestring. If it is neither gzipped or pkzipped, return the string unmodified.