diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-01 15:45:02 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-01 15:45:02 +0000 |
commit | dd7117cd4438b40b7036d335f476dfa6c77a004c (patch) | |
tree | 7fd6f0358b94ad9cd2cc41c524b886395943c5b7 /utils | |
parent | ac9b48f9044ceb4040328a7378ce467cbf3cff9b (diff) | |
download | rspamd-dd7117cd4438b40b7036d335f476dfa6c77a004c.tar.gz rspamd-dd7117cd4438b40b7036d335f476dfa6c77a004c.zip |
[Minor] Fix NS definitions in asn script
Diffstat (limited to 'utils')
-rw-r--r-- | utils/asn.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/utils/asn.pl b/utils/asn.pl index be56c0962..11bb6746b 100644 --- a/utils/asn.pl +++ b/utils/asn.pl @@ -38,6 +38,7 @@ my $v4_zone = "asn.rspamd.com"; my $v6_zone = "asn6.rspamd.com"; my $v4_file = "asn.zone"; my $v6_file = "asn6.zone"; +my $ns_servers = ["asn-ns.rspamd.com", "asn-ns2.rspamd.com"]; GetOptions( "download-asn" => \$download_asn, @@ -50,6 +51,7 @@ GetOptions( "zone-v6=s" => \$v6_zone, "file-v4=s" => \$v4_file, "file-v6=s" => \$v6_file, + "ns-server=s@" => \$ns_servers, "help|?" => \$help, "man" => \$man ) or pod2usage(2); @@ -89,14 +91,18 @@ my $v6_fh; if ($v4) { open( $v4_fh, ">", $v4_file ) or die "Cannot open $v4_file for writing: $!"; print $v4_fh - "\$SOA 43200 ns1.$v4_zone support.rspamd.com 0 600 300 86400 300\n"; - print $v4_fh "\$NS 43200 ns1.$v4_zone\n"; + "\$SOA 43200 $ns_servers->[0] support.rspamd.com 0 600 300 86400 300\n"; + foreach my $ns (@{$ns_servers}) { + print $v4_fh "\$NS 43200 $ns\n"; + } } if ($v6) { open( $v6_fh, ">", $v6_file ) or die "Cannot open $v6_file for writing: $!"; print $v6_fh - "\$SOA 43200 ns1.$v6_zone support.rspamd.com 0 600 300 86400 300\n"; - print $v6_fh "\$NS 43200 ns1.$v6_zone\n"; + "\$SOA 43200 $ns_servers->[0] support.rspamd.com 0 600 300 86400 300\n"; + foreach my $ns (@{$ns_servers}) { + print $v6_fh "\$NS 43200 $ns\n"; + } } # Now load BGP data |