dataset/seed/applicationservice/2022.03.08/nsd/templates/nsd.reverse
Emmanuel Garette 5ccb69012b dovecot
2022-05-04 10:29:03 +02:00

32 lines
1.1 KiB
Text

%set %%name = None
%set %%network = %%ip_network(%%nsd_reverse_network[%%rougail_index])
%for %%zone in %%nsd_zones_all
%set %%suffix = %%normalize_family(%%zone)
%set %%hostnames = %%nsd["nsd_zone_" + %%suffix]["hostname_" + %%suffix]["hostname_" + %%suffix]
%for %%hostname in %%hostnames
%set %%type = %%hostname['type_' + %%suffix]
%if %%type == 'A'
%if not %%name
%set %%name = %%str(%%zone)
$ORIGIN %%rougail_variable
$TTL 1800
@ IN SOA %%domain_name_eth0. admin.%%name. (
0000000000 ; serial number
3600 ; refresh
900 ; retry
1209600 ; expire
1800 ; ttl
)
; Name servers
IN NS %%domain_name_eth0.
%end if
%set %%ip = %%hostname['ip_' + %%suffix]
%if %%ip_address(%%ip) in %%network
%set %%id = %%ip.rsplit('.', 1)[1]
%%id PTR %%hostname.%%{zone}.
%end if
%end if
%end for
%end for