<p>Hello everyone. I'm having a problem using the Pipe backend.<br />
<br />
What I'm trying to do is have all queries that come in get answered with a
specific ip. To do this, I'm trying out the Pipe backend using a basic
perl script.<br />
<br />
pdns.conf (authritative server version 3.3):<br />
launch=pipe<br />
pipe-command=/etc/pdns/example.pl<br />
local-address=127.0.0.1<br />
default-soa-name=billy.com</p><p>-----------------------------<br />
perl script:<br />
#!/usr/bin/perl<br />
<br />
use warnings;<br />
use strict;<br />
<br />
$|=1;              
     # no buffering<br />
<br />
my $line=<>;<br />
chomp($line);<br />
<br />
unless($line eq "HELO\t1") {<br />
    print "FAIL\n";<br />
    print STDERR "Received '$line'\n";<br />
    <>;<br />
    exit;<br />
}<br />
print "OK    Pipe backend firing
up\n";    # print our banner<br />
<br />
while(<>)<br />
{<br />
    print STDERR "$$ Received: $_";<br />
    chomp();<br />
    my @arr=split(/\t/);<br />
    if(@arr<6) {<br />
        print "LOG  
 PowerDNS sent unparseable line\n";<br />
        print "FAIL\n";<br />
        next;<br />
    }<br />
<br />
    my
($type,$qname,$qclass,$qtype,$id,$ip)=split(/\t/);<br />
<br />
    if ($qtype eq "A" || $qtype eq
"ANY") {<br />
        print STDERR "$$ Sent A
records\n";<br />
        print "DATA  
 $qname    $qclass    A  
 3600    -1    192.168.1.69\n";<br
/>
    }<br />
<br />
    print STDERR "$$ End of data\n";<br />
    print "END\n";<br />
}</p><p><br />
-----------------------------<br />
pdns monitor:<br />
Aug 16 17:30:48 Remote 127.0.0.1 wants 'billy.com|A', do = 0, bufsize =
512: packetcache MISS<br />
29715 Received: Q    billy.com  
 IN    SOA    -1  
 127.0.0.1<br />
29715 End of data<br />
<br />
Looks like it queries for an SOA record first, doesn't find anything and
just returns an empty response. I tried adding default-soa-name in the
conf, but that doesn't seem to work as I anticipated either.<br />
<br />
Any help would be appreciated.</p><p>Thanks,</p><p>Billy</p>