mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
DOCS: consistency in code examples in language reference (#2394)
This commit is contained in:
committed by
GitHub
parent
0b7dabacc8
commit
e97cf01744
@ -42,9 +42,9 @@ DMARC policies for your domains.
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
DMARC_BUILDER({
|
||||
policy: 'reject',
|
||||
policy: "reject",
|
||||
ruf: [
|
||||
'mailto:mailauth-reports@example.com',
|
||||
"mailto:mailauth-reports@example.com",
|
||||
],
|
||||
})
|
||||
```
|
||||
@ -61,20 +61,20 @@ This yield the following record:
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
DMARC_BUILDER({
|
||||
policy: 'reject',
|
||||
subdomainPolicy: 'quarantine',
|
||||
policy: "reject",
|
||||
subdomainPolicy: "quarantine",
|
||||
percent: 50,
|
||||
alignmentSPF: 'r',
|
||||
alignmentDKIM: 'strict',
|
||||
alignmentSPF: "r",
|
||||
alignmentDKIM: "strict",
|
||||
rua: [
|
||||
'mailto:mailauth-reports@example.com',
|
||||
'https://dmarc.example.com/submit',
|
||||
"mailto:mailauth-reports@example.com",
|
||||
"https://dmarc.example.com/submit",
|
||||
],
|
||||
ruf: [
|
||||
'mailto:mailauth-reports@example.com',
|
||||
"mailto:mailauth-reports@example.com",
|
||||
],
|
||||
failureOptions: '1',
|
||||
reportInterval: '1h',
|
||||
failureOptions: "1",
|
||||
reportInterval: "1h",
|
||||
});
|
||||
```
|
||||
{% endcode %}
|
||||
@ -82,10 +82,10 @@ DMARC_BUILDER({
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
DMARC_BUILDER({
|
||||
label: 'insecure',
|
||||
policy: 'none',
|
||||
label: "insecure",
|
||||
policy: "none",
|
||||
ruf: [
|
||||
'mailto:mailauth-reports@example.com',
|
||||
"mailto:mailauth-reports@example.com",
|
||||
],
|
||||
failureOptions: {
|
||||
SPF: false,
|
||||
@ -105,17 +105,17 @@ insecure IN TXT "v=DMARC1; p=none; ruf=mailto:mailauth-reports@example.com;
|
||||
|
||||
### Parameters
|
||||
|
||||
* `label:` The DNS label for the DMARC record (`_dmarc` prefix is added, default: `'@'`)
|
||||
* `label:` The DNS label for the DMARC record (`_dmarc` prefix is added, default: `"@"`)
|
||||
* `version:` The DMARC version to be used (default: `DMARC1`)
|
||||
* `policy:` The DMARC policy (`p=`), must be one of `'none'`, `'quarantine'`, `'reject'`
|
||||
* `subdomainPolicy:` The DMARC policy for subdomains (`sp=`), must be one of `'none'`, `'quarantine'`, `'reject'` (optional)
|
||||
* `alignmentSPF:` `'strict'`/`'s'` or `'relaxed'`/`'r'` alignment for SPF (`aspf=`, default: `'r'`)
|
||||
* `alignmentDKIM:` `'strict'`/`'s'` or `'relaxed'`/`'r'` alignment for DKIM (`adkim=`, default: `'r'`)
|
||||
* `policy:` The DMARC policy (`p=`), must be one of `"none"`, `"quarantine"`, `"reject"`
|
||||
* `subdomainPolicy:` The DMARC policy for subdomains (`sp=`), must be one of `"none"`, `"quarantine"`, `"reject"` (optional)
|
||||
* `alignmentSPF:` `"strict"`/`"s"` or `"relaxed"`/`"r"` alignment for SPF (`aspf=`, default: `"r"`)
|
||||
* `alignmentDKIM:` `"strict"`/`"s"` or `"relaxed"`/`"r"` alignment for DKIM (`adkim=`, default: `"r"`)
|
||||
* `percent:` Number between `0` and `100`, percentage for which policies are applied (`pct=`, default: `100`)
|
||||
* `rua:` Array of aggregate report targets (optional)
|
||||
* `ruf:` Array of failure report targets (optional)
|
||||
* `failureOptions:` Object or string; Object containing booleans `SPF` and `DKIM`, string is passed raw (`fo=`, default: `'0'`)
|
||||
* `failureFormat:` Format in which failure reports are requested (`rf=`, default: `'afrf'`)
|
||||
* `failureOptions:` Object or string; Object containing booleans `SPF` and `DKIM`, string is passed raw (`fo=`, default: `"0"`)
|
||||
* `failureFormat:` Format in which failure reports are requested (`rf=`, default: `"afrf"`)
|
||||
* `reportInterval:` Interval in which reports are requested (`ri=`)
|
||||
* `ttl:` Input for `TTL` method (optional)
|
||||
|
||||
|
@ -38,7 +38,7 @@ Note that the following are acceptable forms (symbols differ):
|
||||
D("example.com","none"
|
||||
LOC_BUILDER_STR({
|
||||
label: "tasmania",
|
||||
str: '42°S 147°E',
|
||||
str: "42°S 147°E",
|
||||
alt: 3,
|
||||
})
|
||||
);
|
||||
|
@ -38,7 +38,7 @@ Note that the following are acceptable forms (symbols differ):
|
||||
D("example.com","none"
|
||||
LOC_BUILDER_DMS_STR({
|
||||
label: "sydney-opera-house",
|
||||
str: '33°51′31″S 151°12′51″E',
|
||||
str: "33°51′31″S 151°12′51″E",
|
||||
alt: 4,
|
||||
ttl: "5m",
|
||||
})
|
||||
|
@ -35,17 +35,17 @@ Accepts a string and tries all `LOC_BUILDER_DM*_STR({})` methods:
|
||||
D("example.com","none"
|
||||
, LOC_BUILDER_STR({
|
||||
label: "old-faithful",
|
||||
str: '44.46046°N 110.82815°W',
|
||||
str: "44.46046°N 110.82815°W",
|
||||
alt: 2240,
|
||||
})
|
||||
, LOC_BUILDER_STR({
|
||||
label: "ribblehead-viaduct",
|
||||
str: '54.210436°N 2.370231°W',
|
||||
str: "54.210436°N 2.370231°W",
|
||||
alt: 300,
|
||||
})
|
||||
, LOC_BUILDER_STR({
|
||||
label: "guinness-brewery",
|
||||
str: '53°20′40″N 6°17′20″W',
|
||||
str: "53°20′40″N 6°17′20″W",
|
||||
alt: 300,
|
||||
})
|
||||
);
|
||||
|
@ -33,7 +33,7 @@ It doesn't set up SPF or DMARC. See [`SPF_BUILDER`](/language-reference/record-m
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
M365_BUILDER({
|
||||
initialDomain: 'example.onmicrosoft.com',
|
||||
initialDomain: "example.onmicrosoft.com",
|
||||
});
|
||||
```
|
||||
{% endcode %}
|
||||
@ -45,13 +45,13 @@ This sets up `MX` records, Autodiscover, and DKIM.
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
M365_BUILDER({
|
||||
label: 'test',
|
||||
label: "test",
|
||||
mx: false,
|
||||
autodiscover: false,
|
||||
dkim: false,
|
||||
mdm: true,
|
||||
domainGUID: 'test-example-com', // Can be automatically derived in this case, if example.com is the context.
|
||||
initialDomain: 'example.onmicrosoft.com',
|
||||
domainGUID: "test-example-com", // Can be automatically derived in this case, if example.com is the context.
|
||||
initialDomain: "example.onmicrosoft.com",
|
||||
});
|
||||
```
|
||||
{% endcode %}
|
||||
@ -60,7 +60,7 @@ This sets up Mobile Device Management only.
|
||||
|
||||
### Parameters
|
||||
|
||||
* `label` The label of the Microsoft 365 domain, useful if it is a subdomain (default: `'@'`)
|
||||
* `label` The label of the Microsoft 365 domain, useful if it is a subdomain (default: `"@"`)
|
||||
* `mx` Set an `MX` record? (default: `true`)
|
||||
* `autodiscover` Set Autodiscover `CNAME` record? (default: `true`)
|
||||
* `dkim` Set DKIM `CNAME` records? (default: `true`)
|
||||
|
@ -39,7 +39,7 @@ Here is an example of how SPF settings are normally done:
|
||||
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
D("example.tld", REG, DNS, ...
|
||||
D("example.tld", REG_MY_PROVIDER, DNS, ...
|
||||
TXT("v=spf1 ip4:198.252.206.0/24 ip4:192.111.0.0/24 include:_spf.google.com include:mailgun.org include:spf-basic.fogcreek.com include:mail.zendesk.com include:servers.mcsv.net include:sendgrid.net include:450622.spf05.hubspotemail.net ~all")
|
||||
)
|
||||
```
|
||||
@ -55,7 +55,7 @@ This has a few problems:
|
||||
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
D("example.tld", REG, DSP, ...
|
||||
D("example.tld", REG_MY_PROVIDER, DSP, ...
|
||||
A("@", "10.2.2.2"),
|
||||
MX("@", "example.tld."),
|
||||
SPF_BUILDER({
|
||||
@ -98,7 +98,7 @@ When you want to specify SPF settings for a domain, use the
|
||||
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
D("example.tld", REG, DSP, ...
|
||||
D("example.tld", REG_MY_PROVIDER, DSP, ...
|
||||
...
|
||||
...
|
||||
...
|
||||
@ -305,11 +305,11 @@ var SPF_MYSETTINGS = SPF_BUILDER({
|
||||
]
|
||||
});
|
||||
|
||||
D("example.tld", REG, DSP, ...
|
||||
D("example.tld", REG_MY_PROVIDER, DSP, ...
|
||||
SPF_MYSETTINGS
|
||||
);
|
||||
|
||||
D("example2.tld", REG, DSP, ...
|
||||
D("example2.tld", REG_MY_PROVIDER, DSP, ...
|
||||
SPF_MYSETTINGS
|
||||
);
|
||||
```
|
||||
|
@ -26,12 +26,12 @@ The value can be:
|
||||
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
D('example.com', REGISTRAR, DnsProvider('R53'),
|
||||
D("example.com", REGISTRAR, DnsProvider("R53"),
|
||||
DefaultTTL(2000),
|
||||
A('@','1.2.3.4'), // uses default
|
||||
A('foo', '2.3.4.5', TTL(500)), // overrides default
|
||||
A('demo1', '3.4.5.11', TTL('5d')), // 5 days
|
||||
A('demo2', '3.4.5.12', TTL('5w')), // 5 weeks
|
||||
A("@","1.2.3.4"), // uses default
|
||||
A("foo", "2.3.4.5", TTL(500)), // overrides default
|
||||
A("demo1", "3.4.5.11", TTL("5d")), // 5 days
|
||||
A("demo2", "3.4.5.12", TTL("5w")), // 5 weeks
|
||||
);
|
||||
```
|
||||
{% endcode %}
|
||||
|
Reference in New Issue
Block a user