initial prototype
This commit is contained in:
commit
5858499113
5 changed files with 635 additions and 0 deletions
71
dns.d/mythicdns.template.erb
Normal file
71
dns.d/mythicdns.template.erb
Normal file
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# Nameserver records.
|
||||
#
|
||||
@ <%= ttl %> NS ns1.mythic-beasts.com.
|
||||
@ <%= ttl %> NS ns2.mythic-beasts.com.
|
||||
|
||||
% if ipv4?
|
||||
#
|
||||
# The domain name itself
|
||||
#
|
||||
@ <%= ttl %> A <%= ip %>
|
||||
ftp <%= ttl %> A <%= ip %>
|
||||
www <%= ttl %> A <%= ip %>
|
||||
mail <%= ttl %> A <%= ip %>
|
||||
mx <%= ttl %> A <%= ip %>
|
||||
|
||||
|
||||
% end
|
||||
% if ipv6?
|
||||
|
||||
@ <%= ttl %> AAAA <%= ipv6 %>
|
||||
ftp <%= ttl %> AAAA <%= ipv6 %>
|
||||
www <%= ttl %> AAAA <%= ipv6 %>
|
||||
mail <%= ttl %> AAAA <%= ipv6 %>
|
||||
mx <%= ttl %> AAAA <%= ipv6 %>
|
||||
% end
|
||||
#
|
||||
# MX record -- no IP defined, as this is done separately above.
|
||||
#
|
||||
@ <%= ttl %> MX 15 mx
|
||||
|
||||
% if domain.respond_to?(:has_spf?) and domain.has_spf?
|
||||
#
|
||||
# SPF records
|
||||
#
|
||||
@ <%= ttl %> TXT <%= domain.spf_record %>
|
||||
|
||||
% end
|
||||
% if domain.respond_to?(:has_dkim?) and domain.has_dkim?
|
||||
#
|
||||
# DKIM records
|
||||
#
|
||||
<%= domain.dkim_selector %>._domainkey <%= ttl %> TXT v=DKIM1; k=rsa; p=<%= domain.dkim_public_key_b64 %>
|
||||
|
||||
% end
|
||||
% if domain.respond_to?(:has_dmarc?) and domain.has_dmarc?
|
||||
#
|
||||
# DMARC records
|
||||
#
|
||||
_dmarc <%= ttl %> TXT <%= domain.dmarc_record %>
|
||||
|
||||
% end
|
||||
% if domain.respond_to?(:has_xmpp?) and domain.has_xmpp?
|
||||
#
|
||||
# SRV records for XMPP.
|
||||
#
|
||||
_xmpp-client._tcp <%= ttl %> SRV <%= domain.srv_record_for(0,5,5222, domain) %>
|
||||
_xmpp-server._tcp <%= ttl %> SRV<%= domain.srv_record_for(0,5,5269, domain) %>
|
||||
|
||||
% end
|
||||
% if domain.respond_to?(:mailboxes) and domain.mailboxes.length > 0
|
||||
#
|
||||
# SRV records for various mail services
|
||||
#
|
||||
_submission._tcp <%= ttl %> SRV <%= domain.srv_record_for(0,5,587, "mail."+domain) %>
|
||||
_imap._tcp <%= ttl %> SRV <%= domain.srv_record_for(0,5,143, "mail."+domain) %>
|
||||
_imaps._tcp <%= ttl %> SRV <%= domain.srv_record_for(0,5,993, "mail."+domain) %>
|
||||
_pop3._tcp <%= ttl %> SRV <%= domain.srv_record_for(10,5,110, "mail."+domain) %>
|
||||
_pop3s._tcp <%= ttl %> SRV <%= domain.srv_record_for(10,5,995, "mail."+domain) %>
|
||||
|
||||
% end
|
Loading…
Add table
Add a link
Reference in a new issue