<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
Hi all, <br>
<br>
I know this is not strictly related to PDNS only, but an help will
be really appreciated. <br>
<br>
Thanks to anyone givin' a cent.<br>
<br>
<div class="moz-cite-prefix">Il 04/10/2023 18:42, Andrea Biancalani
via Pdns-users ha scritto:<br>
</div>
<blockquote type="cite"
cite="mid:821a2b31-f847-414b-915a-31201866614a@conmet.it">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hello there, <br>
<br>
I'm using latest PDNS server authoritative with MySQL backend and
I want to autoadd 2 records (autodiscover/autoconfig CNAMEs) for
each zone available in my db (that has not those records already
set), to make it more clear:<br>
<br>
Example.<br>
<br>
<blockquote><b>zone1.tld</b><br>
<blockquote>autodiscover.zone1.tld CNAME
autodiscover.outlook.com 3600<br>
autoconfig.zones1.tld CNAME autoconfig.outlook.com 3600<br>
</blockquote>
<b>zone2.tld</b><br>
<blockquote>none<br>
</blockquote>
<br>
<b>zone3.tld</b><br>
<blockquote>none<br>
</blockquote>
<br>
<b>zone4.tld</b><br>
<blockquote>autodiscover.zone4.tld CNAME
autodiscover.outlook.com 3600<br>
autoconfig.zones4.tld CNAME autoconfig.outlook.com 3600<br>
</blockquote>
<br>
<b>zone5.tld</b><br>
<blockquote>autodiscover.zone5.tld CNAME
autodiscover.outlook.com 3600<br>
autoconfig.zones5.tld CNAME autoconfig.outlook.com 3600<br>
<br>
</blockquote>
</blockquote>
Using powerdns db in a mysql shell I can prompt this command<br>
<br>
<blockquote>insert into records(domain_id,name,type,content,ttl)
VALUES ("<b>2</b>","autoconfig.<b>zonename.tld</b>","CNAME","<i><b><my
autoconfig zone></b></i>","3600");<br>
insert into records(domain_id,name,type,content,ttl) VALUES ("<b>2</b>","autodiscover.<b>zonename.tld</b>","CNAME","<i><b><my
autodiscover zone></b></i>","3600");<br>
</blockquote>
<br>
but I need to extract all my zones within a script, than use a
script to extract only null zone IDs, than push values inside db:
not so practical. <br>
<br>
Is there any way to avoid this and push those values inside not
overwriting existing values (where already set)? <br>
<br>
After this I'll schedule a "pdnsutil increase-serial" loop to
increase SOA serials and propagate those differences to slaves
with AXFR.<br>
<br>
Any help is more than welcome!<br>
<br>
Thanks all.<br>
<br>
<br>
<br>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Pdns-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pdns-users@mailman.powerdns.com">Pdns-users@mailman.powerdns.com</a>
<a class="moz-txt-link-freetext" href="https://mailman.powerdns.com/mailman/listinfo/pdns-users">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
Andrea Biancalani - <i>Rep. Commerciale e Tecnico</i><br>
<b>Connessioni Metropolitane srl</b><br>
Via G. Valentini, 14 - Prato (PO) - 59100<br>
Sito web: <a href="https://www.conmet.it"
class="moz-txt-link-freetext">https://www.conmet.it</a><br>
Tel. 0574 536553<br>
Fax. 0574 536554<br>
</div>
</body>
</html>