Mail::STS - library for looking up MTA-STS policies
version 0.04
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
This class provides an interface for looking up RFC8461 MTA-STS policies.
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
Markus Benning <ich@markusbenning.de>
This software is copyright (c) 2018 by Markus Benning <ich@markusbenning.de>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Mail::STS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::STS
CPAN shell
perl -MCPAN -e shell install Mail::STS
For more information on module installation, please visit the detailed CPAN module installation guide.