[net-dns-users] SOA rname as mailbox

Willem Toorop willem at nlnetlabs.nl
Tue May 19 08:38:49 UTC 2015


It is a little bit more nuanced than that.

Net::DNS never gave access to the raw wire format data.  It has always
returned parsed representations of the actual values.  Though, before,
with the SOA rname it returned dname presentation format.

That we have changed this to RFC822 format is unfortunate because it
broke behaviour of existing API.  At the time I deemed it a minor issue
and safe because the returned value was an parsed and formatted one
anyway.  It is very clear to me now that this has been a mistake and we
have taken utmost care to not break existing API this way since.  And we
will make sure to never break this way again or at least communicate
very clear and loudly about it on this list beforehand.

Having that said, ldns also gives a parsed representation of the wire
format packet, though it's internal storage format is much closer to the
original wire format data than with Net::DNS.  Our new stub resolver
library getdns *does* provide access to the raw wire format data
alongside the parsed values.  Perl bindings for it are on their way.

If you really need the dname presentation format of the email address,
you could convert to it with the Net::DNS::Mailbox class:

$mb = new Net::DNS::Mailbox('John.Doe at example.com')
print $mb->name

# John\.Doe.example.com

-- Willem


Op 19-05-15 om 09:20 schreef Calle Dybedahl:
> 
>> On 18 maj 2015, at 18:28, Rob Foehl <rwf at loonybin.net
>> <mailto:rwf at loonybin.net>> wrote:
>>
>> What's the recommended method to get at the domain form now without
>> digging around in the object?  Just feed the rname back through
>> Net::DNS::Mailbox for the string value?
> 
> As you have probably seen already from Mr Franks’ response, you’re not
> meant to do that. If you’re doing something where you want to see the
> details of what came over the wire, Net::LDNS may be a better choice
> (it’s on CPAN). We wrote it for the Zonemaster project (a DNS diagnostic
> tool, jointly developed by the Swedish and French ccTLD registries),
> since it had become clear that the direction Net::DNS was moving in was
> not well aligned with our needs.
> 
>> Calle Dybedahl
> calle.dybedahl at init.se <mailto:calle.dybedahl at init.se>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> net-dns-users mailing list
> net-dns-users at nlnetlabs.nl
> https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users
> 




More information about the net-dns-users mailing list