/usr/share/zentyal/stubs/dns/db.mas is in zentyal-dns 2.3.10+quantal1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | <%doc>
Stub template file to dump the configuration file for a domain zone
Parameters:
domain - hash ref containing the following information:
name - String the domain's name
hosts - Array ref containing hash refs with the following elements:
name - String the host's name
ip - Array ref containing the host ip addresses
aliases - Array ref containing the host aliases
mailExchangers - Array ref containing hash refs with the following elements:
hostName - String the host's name which is a mail exchanger
preference - Int the preference number for that MX record
nameServers - Array ref containing the name servers for this domain
txt - Array ref containing hash refs with the following elements:
hostName - String the host's name which the TXT record belongs
to. It could be the zone
txt_dat - String the arbitrary data
srv - Array ref containing hash refs with the following elements:
service_name - String the service's name
protocol - String the protocol
name - The domain name for which this record is valid
priority - Int the priority
weight - Int the weight
target_port - Int the target port
target_host - Int the target host name
primariNameServer - The primary nameserver of the domain
ipAddresses - Array ref containing the domain ip addresses
</%doc>
<%args>
$domain
</%args>
<%init>
my @time = localtime();
my $date = sprintf("%04d%02d%02d%02d",$time[5]+1900,$time[4]+1,$time[3],$time[2]);
my @nsRRs = @{$domain->{nameServers}};
my @domainIps = @{$domain->{ipAddresses}};
my @hostRRs = @{$domain->{hosts}};
my @mxRRs = @{$domain->{mailExchangers}};
my @txtRRs = @{$domain->{txt}};
my @srvRRs = @{$domain->{srv}};
</%init>
$ORIGIN <% $domain->{name} %>.
$TTL 3D
@ IN SOA <% $domain->{primaryNameServer} %> hostmaster (
<% $date %> ;serial number
8H ;refresh
2H ;retry
4W ;expiration
1D ) ;minimum
;
% foreach my $ns (@nsRRs) {
@ IN NS <% $ns %>
% }
% foreach my $ip (@domainIps) {
@ IN A <% $ip %>
% }
;
% foreach my $host (@hostRRs) {
% foreach my $ip (@{$host->{ip}}) {
<% $host->{name} %> IN A <% $ip %>
% }
% foreach my $alias (@{$host->{aliases}}) {
<% $alias %> IN CNAME <% $host->{name} %>
% }
% }
% foreach my $mxRR (@mxRRs) {
@ IN MX <% $mxRR->{preference} %> <% $mxRR->{hostName} %>
% }
% foreach my $txtRR (@txtRRs) {
<% $txtRR->{hostName} %> IN TXT <% $txtRR->{txt_data} %>
% }
% foreach my $srvRR (@srvRRs) {
_<% $srvRR->{service_name} %>._<% $srvRR->{protocol} %> IN SRV <% $srvRR->{priority} %> <% $srvRR->{weight} %> <% $srvRR->{target_port} %> <% $srvRR->{target_host} %>
% }
|