Named.conf logical blocks

Stefan Certic stefan at
Tue Jun 28 20:54:47 UTC 2011

I am more looking for a solution to read data with perl and convert to some 
native data structure, like hash reference, or multidimenzional array, so i 
can access and change data in form of: $named_conf_file->{view1}-{zoneblah} = 
'somedata' and then dump it back into original format.


On Tuesday, June 28, 2011 09:46:29 pm David Forrest wrote:
> On 06/28/2011 05:53 PM, Stefan Certic wrote:
> > Hi Guys,
> > 
> > Does anyone have a sample grammar for pharsing named.conf into a data
> > structure? Perl or PHP are preffered, but anything would be fine just to
> > get a
> > clear picture about grammar and logical blocks.
> I send mine through named-checkconf to put it in a consistent state.
> This helps to reduce the includes and sort out the views and
> blocks logically.
> See man named-checkconf.
> /usr/local/sbin/named-checkconf -p >/var/named/named.conf.canonical ||\
> echo -e "\nConversion failed, as will named if attempted" \
> &>>/var/named/named.conf.canonical

Stefan Certic

48 Charlotte Street
London, W1T 2NS
United Kingdom
GSMA Associate Member

Switchboard +44 (0) 870 231 7777 
Fax + 44 (0) 870 231 7775

Email  : stefan at
MSN ID : stefan at

This email contains information provided by Routo Telecommunications
Ltd, which may be privileged or confidential. It is meant only for the
individual(s) or entity named above. If you are not the intended
recipient, note that disclosing, copying, distributing or using this
information is prohibited. If you have received this email in error,
please let me know immediately on the email address above.

Routo Telecommunications Ltd may not be held responsible for the
content of this email as it may reflect the personal view of the
sender and not that of the company.

Internet communications cannot be guaranteed to be timely, secure,
error or virus-free. The sender does not accept liability for any
errors or omissions.

We monitor our email system and may record your emails.

Routo Telecommunications Ltd Registration Number 04546322 has its
principal place of business at 48 Charlotte Street, London, W1T 2NS,
United Kingdom.

More information about the bind-users mailing list