This class provides an interface for looking up RFC8461 MTA-STS policies.
my $sts = Mail::STS->new;
$domain = $sts->domain('domain.de');
# may try dane first?
return 'dane' if $domain->tlsa;
# has a TLSRPT record?
$domain->tlsrpt
# undef or Mail::STS::TLSRPTRecord
$domain->sts;
# undef or Mail::STS::STSRecord
$domain->sts->id;
# 12345...
$policy = $domain->policy;
# Mail::STS::Policy or will die on error
$policy->mode;
# 'enforce', 'testing' or 'none'
$policy->mx;
# ['mta1.example.net', '*.example.de', ...]
$policy->match_mx('whatever.example.de');
# 1
Set default for http agent for policy retrieval.
A timeout of one minute is suggested.
Maximum size for STS policy documents in bytes.
By default will use a Net::DNS::Resolver with dnssec/adflag enabled.
Could be used to provide a custom Net::DNS::Resolver object.
By default will initialize a new LWP::UserAgent with parameters take from this object.
These methods are delegated to the LWP::UserAgent object.
See LWP::UserAgent for details.
Set a ssl_ca_file for the default LWP::UserAgent.
Set a ssl_ca_path for the default LWP::UserAgent.
Returns a Mail::STS::Domain object for $domain for lookup of domain details.
Mail::STS::Domain, Mail::STS::Policy, Mail::STS::TLSRPTRecord, Mail::STS::STSRecord