feat: add caa record
This commit is contained in:
parent
ff39078d6f
commit
3cdd9cb10c
4 changed files with 11 additions and 0 deletions
|
@ -42,6 +42,7 @@ bind_zones:
|
|||
entries:
|
||||
- { name: '@', type: ns, value: localhost. }
|
||||
- { name: hello, type: a, ttl: 5m, value: 1.2.3.4 }
|
||||
- { name: hello, type: caa, flag: 0, tag: issue, value: letsencrypt.org }
|
||||
hello.local:
|
||||
ns_primary: ns1.hello.local
|
||||
mail: root@hello.local
|
||||
|
|
|
@ -12,6 +12,8 @@ $TTL {{ item.value.ttl|default(3600) }}
|
|||
{% for entry in item.value.entries %}
|
||||
{% if entry.type|upper == 'MX' %}
|
||||
{{ entry.name }} {{ entry.ttl|default(' ') }} IN MX {{ entry.priority }} {{ entry.value }}
|
||||
{% elif entry.type|upper == 'CAA' %}
|
||||
{{ entry.name }} {{ entry.ttl|default(' ') }} CAA {{ entry.flag }} {{ entry.tag }} "{{ entry.value }}"
|
||||
{% elif entry.type|upper == 'TXT' %}
|
||||
{{ entry.name }} {{ entry.ttl|default(' ') }} IN TXT (
|
||||
{% for charset in entry.value|batch(64) %}
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
- { name: '@', type: mx, priority: 20, value: mail.test.local. }
|
||||
- { name: '@', type: ns, value: localhost. }
|
||||
- { name: hello, type: a, ttl: 5m, value: 1.2.3.4 }
|
||||
- { name: hello, type: caa, flag: 0, tag: issue, value: letsencrypt.org }
|
||||
- { name: hello, type: caa, flag: 0, tag: iodef, value: 'mailto:root@test.local' }
|
||||
hello.local:
|
||||
ns_primary: ns1.hello.local
|
||||
mail: root@hello.local
|
||||
|
|
|
@ -66,6 +66,12 @@ describe command('dig +nocmd +noall +answer -t mx test.local @127.0.0.1') do
|
|||
its(:stdout) { should contain(/test\.local\.\s+3600\s+IN\s+MX\s+20 mail\.test\.local\./) }
|
||||
end
|
||||
|
||||
describe command('dig +nocmd +noall +answer -t caa hello.test.local @127.0.0.1') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
its(:stdout) { should contain(/hello\.test\.local\.\s+3600\s+IN\s+CAA\s+0 issue "letsencrypt\.org"/) }
|
||||
its(:stdout) { should contain(/hello\.test\.local\.\s+3600\s+IN\s+CAA\s+0 iodef "mailto:root@test\.local"/) }
|
||||
end
|
||||
|
||||
describe command('dig +nocmd +noall +answer hello.hello.local @127.0.0.1') do
|
||||
its(:exit_status) { should eq 0 }
|
||||
its(:stdout) { should contain(/hello\.hello\.local\.\s+3600\s+IN\s+A\s+4\.3\.2\.1/) }
|
||||
|
|
Loading…
Reference in a new issue