You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DNSControl contains a `DKIM_BUILDER` which can be used to simply create
27
-
DKIM policies for your domains.
28
-
28
+
DNSControl contains a `DKIM_BUILDER` helper function that generates DKIM DNS TXT records according to RFC 6376 (DomainKeys Identified Mail) and its updates.
29
29
30
-
## Example
30
+
## Examples
31
31
32
32
### Simple example
33
33
@@ -54,13 +54,15 @@ s1._domainkey IN TXT "v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4
*`servicetypes:` Record-applicable service types (optional)
87
-
*`note:` Note field `n` for admins. Avoid if possible to keep record length short. (optional)
88
-
*`ttl:` Input for `TTL` method (optional)
89
-
90
-
### Caveats
91
-
92
-
* DKIM (TXT) records are automatically split using `AUTOSPLIT`.
78
+
## Parameters
79
+
80
+
*`selector` (string, required): The selector subdividing the namespace for the domain.
81
+
*`pubkey` (string, optional): The base64-encoded public key (RSA or Ed25519). Default: empty (key revocation or non-sending domain).
82
+
*`label` (string, optional): The DNS label for the DKIM record. Default: `@`.
83
+
*`version` (string, optional): DKIM version. Maps to the `v=` tag. Default: `DKIM1` (currently the only supported value).
84
+
*`hashtypes` (array, optional): Acceptable hash algorithms for signing. Maps to the `h=` tag.
85
+
* Supported values for RSA key:
86
+
*`sha1`
87
+
*`sha256`
88
+
* Supported values for Ed25519 key:
89
+
*`sha256`
90
+
*`keytype` (string, optional): Key algorithm type. Maps to the `k=` tag. Default: `rsa`. Supported values:
91
+
*`rsa`
92
+
*`ed25519`
93
+
*`notes` (string, optional): Human-readable notes intended for administrators. Pass normal text here; DKIM-Quoted-Printable encoding will be applied automatically. Maps to the `n=` tag.
94
+
*`servicetypes` (array, optional): Service types using this key. Maps to the `s=` tag. Supported values:
95
+
*`*`: explicity allows all service types
96
+
*`email`: restricts key to email service only
97
+
*`flags` (array, optional): Flags to modify the interpretation of the selector. Maps to the `t=` tag. Supported values:
98
+
*`y`: Testing mode.
99
+
*`s`: Subdomain restriction.
100
+
*`ttl` (number, optional): DNS TTL value in seconds
101
+
102
+
## Related RFCs
103
+
104
+
* RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
105
+
* RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM
106
+
* RFC 8463: A New Cryptographic Signature Method for DKIM (Ed25519)
0 commit comments