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

Data.Mail.TLSRPT.Reports

Description

Utilities for parsing an SMTP-TLRPT aggregated report, following RFC 8460. These functions also handle decompression (gzip or pkzip)

Synopsis

Parsers

tlsReportFromStrict :: ByteString -> Either String Report Source #

Parse a TLSRPT report from a strict ByteString

tlsReportFromLazy :: ByteString -> Either String Report Source #

Parse a TLSRPT report from a lazy ByteString

tlsReportFromJson :: Value -> Either String Report Source #

Parse a TLSRPT report from a JSON Value

Data types

data Report Source #

The entire SMTP-TLSRPT report

Constructors

Report 

Fields

Instances

Instances details
Eq Report Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

Methods

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

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

Read Report Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

Show Report Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

ToJSON Report Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

FromJSON Report Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

data Policy Source #

Constructors

Policy 

Fields

Instances

Instances details
Eq Policy Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

Methods

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

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

Read Policy Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

Show Policy Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

ToJSON Policy Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

FromJSON Policy Source # 
Instance details

Defined in Data.Mail.TLSRPT.Reports

data PolicyDesc Source #

Description of the evaluated policy

Constructors

PolicyDesc 

Fields

data FailureDetails Source #

Constructors

FailureDetails 

Fields

data PolicyType Source #

Constructors

NoPolicyFound

neither MTA-STS nor DANE

TlsaPolicy

DANE policy (TLSA record)

StsPolicy

MTA-STS policy

data ResultType Source #

Failure types

Constructors

StarttlsNotSupported

recipient MX did not support STARTTLS

CertificateHostMismatch

MX hostname does not match any of the subject alternative names in the certificate

CertificateExpired

certificate has expired

CertificateNotTrusted

certificate is not signed by any trusted CA

ValidationFailure

general negotiation failure (other)

TlsaInvalid

validation error in the TLSA record

DnssecInvalid

no valid records were returned from the recursive resolver

DaneRequired

sending system is configured to require DANE TLSA records for all the MX hosts of the destination domain, but no DNSSEC-validated TLSA records were present for the MX host

StsPolicyFetchError

failure to retrieve an MTA-STS policy (e.g. host unreachable)

StsPolicyInvalid

validation error for the overall MTA-STS policy

StsWebpkiInvalid

MTA-STS policy could not be authenticated using PKIX validation