Dmarc Verifier Class
Definition
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
public class DmarcVerifier- Inheritance
- Object DmarcVerifier
Remarks
Validates the use of the Author Domain of a message, as specified by RFC 9989 (Domain-based Message Authentication, Reporting, and Conformance).
The verifier extracts the Author Domain from the From header, discovers the applicable DMARC Policy Record using the DNS Tree Walk (RFC 9989, Section 4.10), and checks whether any DKIM or SPF Authenticated Identifier is aligned with the Author Domain.
The verifier does not decide what to do with a message that fails validation; see DmarcValidationResult for details.
The DNS Tree Walk makes at most 8 DNS queries per domain, and queries are cached for the duration of each call to Verify. The number of domains that are evaluated is bounded by MaxAuthorDomains and MaxDkimSignatures.
Constructors
| DmarcVerifier(IDnsResolver) | Initialize a new instance of the DmarcVerifier class. |
| DmarcVerifier(IDnsResolver, DkimVerifier) | Initialize a new instance of the DmarcVerifier class. |
Properties
| DkimVerifier | Get the DKIM verifier. |
| DnsResolver | Get the DNS resolver. |
| MaxAuthorDomains | Get or set the maximum number of Author Domains to evaluate. |
| MaxDkimSignatures | Get or set the maximum number of DKIM results to evaluate. |
Methods
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Verify(MimeMessage, SpfCheckResult, CancellationToken) | Validate the message. |
| Verify(FormatOptions, MimeMessage, SpfCheckResult, CancellationToken) | Validate the message. |
| Verify(MimeMessage, IEnumerableDkimSignatureValidationResult, SpfCheckResult, CancellationToken) | Validate the message using the specified DKIM and SPF results. |
| VerifyAsync(MimeMessage, SpfCheckResult, CancellationToken) | Asynchronously validate the message. |
| VerifyAsync(FormatOptions, MimeMessage, SpfCheckResult, CancellationToken) | Asynchronously validate the message. |
| VerifyAsync(MimeMessage, IEnumerableDkimSignatureValidationResult, SpfCheckResult, CancellationToken) | Asynchronously validate the message using the specified DKIM and SPF results. |