#!/usr/bin/perl -Tw
-# autodns 0.0.6
-# Copyright 1999-2003 Project Purple. Written by Jonathan McDowell
+# autodns 0.0.7
+# Copyright 1999-2004 Project Purple. Written by Jonathan McDowell
# See ACKNOWLEDGEMENTS file for full details of contributors.
# http://www.earth.li/projectpurple/progs/autodns.html
# Released under the GPL.
#
-# $Id: autodns.pl,v 1.2 2003/06/04 17:27:00 noodles Exp $
+# $Id: autodns.pl,v 1.4 2004/04/08 10:48:35 noodles Exp $
#
use strict;
my ($domain, @MAIL, @GPGERROR, @COMMANDS, %zones);
my ($me, $ccreply, $conffile, $domainlistroot, @cfgfiles, $VERSION);
-$VERSION="0.0.6";
+$VERSION="0.0.7";
#
# Local configuration here (until it gets moved to a config file).
Subject: $subject
AutoDNS $VERSION
-Copyright 1999-2001 Project Purple. Written by Jonathan McDowell.
+Copyright 1999-2004 Project Purple. Written by Jonathan McDowell.
Released under the GPL.
EOF
print REPLY "Adding domain $domain\n";
$zones{$domain}=1;
+ my $df = $domain;
+ $df =~ tr,/,:,;
+
open (DOMAINSFILE, ">>$conffile");
print DOMAINSFILE "
### Domain added for '$user'
zone \"$domain\" {
type slave;
masters { $server; };
- file \"secondary/$user/$domain\";
+ file \"secondary/$user/$df\";
allow-transfer { none; };
allow-query { any; };
};\n";