API Reference
MTASTSAnalysis
Provides functionality for retrieving and analysing MTA-STS policies.
Inheritance
- Object
- MTASTSAnalysis
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property DomainHealthCheck.MTASTSAnalysis
- Property MtastsInfo.Raw
Accepted by parameters
- Method MtaStsNarrative.Build
- Method Converters.Convert
Constructors
public MTASTSAnalysis() #Methods
public async Task AnalyzeDnsBootstrap(String domainName, InternalLogger logger) #TaskAnalyzes only the DNS bootstrap record for the specified domain.
Parameters
- domainName System.String
- The domain to query.
- logger DomainDetective.InternalLogger
- A logger for warning messages.
Returns
A task that represents the asynchronous operation.
public async Task AnalyzePolicy(String domainName, InternalLogger logger) #TaskFetches and analyses the policy for the specified domain using HTTPS.
Parameters
- domainName System.String
- The domain to query.
- logger DomainDetective.InternalLogger
- A logger for warning messages.
Returns
A task that represents the asynchronous operation.
public Void AnalyzePolicyText(String text) #VoidAnalyses the supplied policy text.
Parameters
- text System.String
- Raw policy contents.
GetPolicy(System.String url) #Retrieves the policy contents from the specified URL.
Parameters
- url System.String
- The policy URL.
Returns
The policy text or null if the request failed.
ParsePolicy(System.String text) #Parses the supplied policy text and updates property values.
Parameters
- text System.String
- Raw policy text.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public TimeSpan CacheDuration { get; set; } #Upper limit for how long a fetched policy is cached. The actual expiration is the lesser of this value and the policy's max_age.
public String Domain { get; set; } #Gets the domain name that was analysed.
public Boolean PolicyPresent { get; set; } #Gets a value indicating whether the policy was successfully fetched.
public Boolean PolicyFetchSkipped { get; set; } #Gets a value indicating whether only the DNS bootstrap was evaluated.
public Boolean PolicyValid { get; set; } #Gets a value indicating whether the policy is valid.
public Boolean ValidVersion { get; set; } #Gets a value indicating whether the policy version is valid.
public Boolean VersionPresent { get; set; } #Gets a value indicating whether the policy contained a version field.
public Boolean HasDuplicateFields { get; set; } #Gets a value indicating whether any field appeared more than once.
public Boolean ValidMode { get; set; } #Gets a value indicating whether the policy mode is valid.
public Boolean ValidMaxAge { get; set; } #Gets a value indicating whether the Max-Age value is valid.
public Boolean HasMx { get; set; } #Gets a value indicating whether at least one MX entry was found.
public String Mode { get; set; } #Gets the policy mode value.
public Int32 MaxAge { get; set; } #Gets the Max-Age value defined by the policy.
public List<String> Mx { get; set; } #Gets the list of MX entries found in the policy.
public String Policy { get; set; } #Gets the text of the policy.
public Boolean EnforcesMtaSts { get; } #Gets a value indicating whether the policy enforces MTA-STS.
Logger #Gets or sets the logger instance used for reporting warnings.
public String PolicyUrlOverride { get; set; } #Gets or sets a policy URL override. When set, this URL is used instead of constructing one from the domain name. Primarily intended for testing.
public DnsConfiguration DnsConfiguration { get; set; } #Provides DNS configuration used for queries.
public Func<String, DnsRecordType, Task<DnsAnswer[]>> QueryDnsOverride { get; set; } #Optional DNS query override for testing.
public Boolean DnsRecordPresent { get; set; } #Gets a value indicating whether the TXT record exists.
public Boolean DnsRecordValid { get; set; } #Gets a value indicating whether the TXT record is valid.
public String PolicyId { get; set; } #Gets the policy ID extracted from the TXT record.
public Nullable<Int32> DnsRecordTtl { get; set; } #DNS TTL (seconds) of the _mta-sts TXT record as returned by DNS.
public Nullable<Int32> CnameTtl { get; set; } #TTL (seconds) of the CNAME record when this record was resolved via CNAME alias.
public Boolean IsCnameResolved { get; set; } #True when the MTA-STS TXT record was resolved through a CNAME alias.
public String Advisory { get; set; } #Summary message describing MTA-STS status.
public Boolean MxAligned { get; set; } #Indicates whether policy MX patterns cover actual DNS MX hosts.
public List<String> MissingMxFromPolicy { get; set; } #Actual MX hosts missing from the policy patterns.
public IReadOnlyList<StandardReference> RfcReferences { get; } #Relevant standards for MTA-STS analysis.
public virtual List<Assessment> Assessments { get; } #Gets the assessments value.
public IReadOnlyList<RecommendationAdvice> Recommendations { get; } #Represents the recommendations value.