mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-12-09 21:55:57 +08:00
2.1 KiB
2.1 KiB
| name | parameters | parameters_object | parameter_types | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DKIM_BUILDER |
|
true |
|
DNSControl contains a DKIM_BUILDER which can be used to simply create
DKIM policies for your domains.
Example
Simple example
{% code title="dnsconfig.js" %}
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
DKIM_BUILDER({
selector: "s1",
pubkey: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L"
}),
);
{% endcode %}
This yield the following record:
s1._domainkey IN TXT "v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L"
Advanced example
{% code title="dnsconfig.js" %}
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
DKIM_BUILDER({
label: "alerts",
selector: "k2",
pubkey: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L",
flags: ['y'],
hashtypes: ['sha256'],
keytype: 'rsa',
servicetypes: ['email'],
ttl: 150
}),
);
{% endcode %}
This yields the following record:
k2._domainkey.alerts IN TXT "v=DKIM1; k=rsa; s=email; t=y; h=sha256; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L" ttl=150
Parameters
label:The DNS label for the DKIM record ([selector]._domainkeyprefix is added; default:'@')selector:Selector used for the label. e.g.s1ormailpubkey:Public keypto be used for DKIM.keytype:Key typek. Defaults to'rsa'if omitted (optional)flags:Which typestof flags to activate, ie. 'y' and/or 's'. Array, defaults to 's' (optional)hashtypes:Acceptable hash algorithmsh(optional)servicetypes:Record-applicable service types (optional)note:Note fieldnfor admins. Avoid if possible to keep record length short. (optional)ttl:Input forTTLmethod (optional)
Caveats
- DKIM (TXT) records are automatically split using
AUTOSPLIT.