mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Add a "commented SPF record" example.
This commit is contained in:
@ -59,7 +59,7 @@ D('example.com', REG, DnsProvider('R53'),
|
||||
)
|
||||
{% endhighlight %}
|
||||
|
||||
## Macro to group repeated records
|
||||
## Macro to for repeated records
|
||||
|
||||
{% highlight javascript %}
|
||||
|
||||
@ -74,17 +74,19 @@ var GOOGLE_APPS_RECORDS = [
|
||||
CNAME('mail', 'ghs.googlehosted.com.'),
|
||||
CNAME('groups', 'ghs.googlehosted.com.'),
|
||||
CNAME('sites', 'ghs.googlehosted.com.'),
|
||||
CNAME('start', 'ghs.googlehosted.com.'),
|
||||
]
|
||||
|
||||
D('example.com', REG, DnsProvider('R53'),
|
||||
GOOGLE_APPS_RECORDS,
|
||||
A('@', '1.2.3.4')
|
||||
)
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
## Add comments along complex SPF records
|
||||
|
||||
You can't normally put comments in the middle of a string,
|
||||
You normally can't put comments in the middle of a string,
|
||||
but with a little bit of creativity you can document
|
||||
each element of an SPF record this way.
|
||||
|
||||
@ -102,6 +104,10 @@ var SPF_RECORDS = TXT('@', [
|
||||
'~all'
|
||||
].join(' '));
|
||||
|
||||
D('example.com', REG, DnsProvider('R53'),
|
||||
SPF_RECORDS,
|
||||
)
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
## Dual DNS Providers
|
||||
|
Reference in New Issue
Block a user