Class DkimSignerOptions
Options for DKIM signing (RFC 6376 §5).
Inherited Members
Namespace: DRIT.Mail.Rfc.Dkim
Assembly: DRIT.Mail.dll
Syntax
public sealed class DkimSignerOptions
Properties
View SourceAlgorithm
Gets or sets the signing algorithm (a= tag). Defaults to RSA-SHA256, the required algorithm.
Declaration
public DkimSigningAlgorithm Algorithm { get; set; }
Property Value
| Type | Description |
|---|---|
| DkimSigningAlgorithm |
BodyCanonicalization
Gets or sets the body canonicalization mode (c= tag, second part). Defaults to relaxed.
Declaration
public DkimCanonicalizationMode BodyCanonicalization { get; set; }
Property Value
| Type | Description |
|---|---|
| DkimCanonicalizationMode |
BodyLength
Gets or sets the body length count (l= tag). Null means no limit (the entire canonicalized body is hashed).
Declaration
public long? BodyLength { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
Domain
Gets or sets the signing domain (d= tag).
Declaration
public string Domain { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Expiration
Gets or sets the signature expiration (x= tag), relative to the signing time. Null means no expiration.
Declaration
public TimeSpan? Expiration { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
HeaderCanonicalization
Gets or sets the header canonicalization mode (c= tag, first part). Defaults to relaxed.
Declaration
public DkimCanonicalizationMode HeaderCanonicalization { get; set; }
Property Value
| Type | Description |
|---|---|
| DkimCanonicalizationMode |
Identity
Gets or sets the signer identity (i= tag). If null, the i= tag is omitted. If specified, the domain part must match Domain.
Declaration
public string? Identity { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IncludeCopiedHeaders
Gets or sets a value indicating whether to include copied header fields (z= tag) for debugging. Defaults to false.
Declaration
public bool IncludeCopiedHeaders { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IncludeTimestamp
Gets or sets a value indicating whether to include the signing timestamp (t= tag). Defaults to true.
Declaration
public bool IncludeTimestamp { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
PrivateKey
Gets or sets the RSA private key used to sign the message.
Declaration
public RSA? PrivateKey { get; set; }
Property Value
| Type | Description |
|---|---|
| RSA |
Selector
Gets or sets the selector (s= tag).
Declaration
public string Selector { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SignedHeaders
Gets or sets the list of header fields to sign (h= tag). The From header is always included. If null, a default set is used.
Declaration
public IReadOnlyList<string>? SignedHeaders { get; set; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |