# Copyright (c) 2010 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: NamedConf2.bunit,v 2.2 2010/12/09 18:39:54 nagler Exp $ ShellUtil(); foreach my $x ( [c1 => <<'EOF'], 'example.com' => { ipv4 => { '111.22.33.24/29' => { 25 => ['mail', 'mail2'], }, }, }, EOF [c2 => <<'EOF'], 'example.com' => { ipv4 => { '111.22.33.24/29' => { 25 => [ ['mail', {ptr => 1}], ], }, }, }, 'example2.com' => { ipv4 => { '111.22.33.24/29' => { 25 => [ ['mail', {ptr => 1}], ], }, }, }, EOF ) { my($file, $zones) = @$x; write_file( "NamedConf/$file", <<"EOF" { expiry => '5M', hostmaster => 'hostmaster.example.com.', minimum => '6M', mx_pref => 10, servers => [qw(ns1.example.com. ns2.example.com.)], refresh => '7M', retry => '8M', spf1 => 'include:aspmx.googlemail.com', ttl => '9M', nets => { '24-31.33.22.111' => '111.22.33.24/29', }, zones => { $zones } }; EOF ); } [ [qw(-input NamedConf/c1 generate)] => qr{no PTR records for 111.22.33.25}, [qw(-input NamedConf/c2 generate)] => qr{too many PTR records for 111.22.33.25}, ];