Class DkimDnsKeyResolver
Default DNS-based DKIM key resolver (RFC 6376 §3.6). Queries the TXT record at
<selector>._domainkey.<domain> and parses the response.
Implements
Inherited Members
Namespace: DRIT.Mail.Rfc.Dkim
Assembly: DRIT.Mail.dll
Syntax
public sealed class DkimDnsKeyResolver : IDkimKeyResolver
Constructors
View SourceDkimDnsKeyResolver()
Initializes a new instance of the DkimDnsKeyResolver class with a default DNS client.
Declaration
public DkimDnsKeyResolver()
DkimDnsKeyResolver(DnsClient)
Initializes a new instance of the DkimDnsKeyResolver class with the specified DNS client.
Declaration
public DkimDnsKeyResolver(DnsClient dnsClient)
Parameters
| Type | Name | Description |
|---|---|---|
| DnsClient | dnsClient | The DNS client to use for TXT record lookup. |
Methods
View SourceResolve(string, string)
Resolves the DKIM key record for the given selector and domain by querying
the TXT record at <selector>._domainkey.<domain>.
Declaration
public DkimKeyRecord? Resolve(string selector, string domain)
Parameters
| Type | Name | Description |
|---|---|---|
| string | selector | The selector (s= tag). |
| string | domain | The signing domain (d= tag). |
Returns
| Type | Description |
|---|---|
| DkimKeyRecord | The parsed DkimKeyRecord, or null if no TXT record was found. |
Exceptions
| Type | Condition |
|---|---|
| DkimException | Thrown on a temporary DNS failure (timeout, server error). |