| |
PA2AGA > TCPDIG 19.01.97 04:41l 201 Lines 5856 Bytes #-10752 (0) @ EU
BID : TCP_97_5C
Read: DG7DAH GUEST
Subj: TCP-Group Digest 97/5C
Path: DB0AAB<DB0KCP<DB0ZKA<DB0LX<DB0AAA<DB0CZ<DB0FRB<DB0GE<LX0PAC<ON5VL<
ON4AIC<ON1AEO<ON6AR<PI8HWB<PI8ZAA<PI8GCB<PI8WFL<PI8VNW
Sent: 970118/1803Z @:PI8VNW.#ZH2.NLD.EU #:20407 [Hoek v Holland] FBB5.15c
From: PA2AGA@PI8VNW.#ZH2.NLD.EU
To : TCPDIG@EU
Received: from pa2aga by pi1hvh with SMTP
id AA26470 ; Sat, 18 Jan 97 17:50:21 UTC
Received: from pa2aga by pa2aga (NET/Mac 2.3.62/7.1) with SMTP
id AA00000827 ; Fri, 17 Jan 97 00:24:19 MET
Received: from pa2aga-1 by pa2aga with SMTP
id AA00000752 ; Fri, 17 Jan 97 00:11:58 MET
Received: from pa2aga-1 by pa2aga-1 (NET/Mac 2.3.62/7.5.5) with SMTP
id AA00009049 ; Fri, 17 Jan 97 00:11:56 MET
Date: Thu, 16 Jan 97 20:32:16 MET
Message-Id: <tcp_97_5C>
From: pa2aga
To: tcp_broadcast@pa2aga-1
Subject: TCP-Group Digest 97/5C
X-BBS-Msg-Type: B
print "; WARNING '$field[0]' is outside this domain\n";
print OUTFILE "; WARNING '$field[0]' is outside this domain\n";
}
}
}
# if we find another alias, this too is an error, but accept it
if ( defined( $cname{ $field[0] } ) ) {
if ( $cname{ $field[0] } != $field[3] ) {
$strange = 1;
print "; WARNING previous definition
'$field[0]\tIN\tCNAME\t$field[3]\n";
print OUTFILE "; WARNING previous definition
'$field[0]\tIN\tCNAME\t$field[3]\n";
$add = 1;
}
}
# this is bad, but accept it anyway
if ( defined( $cname{ $field[3] } ) ) {
if ( $cname{ $field[3] } ) {
$add = 1;
$strange = 1;
print "; WARNING should read '$field[0]\t\IN\tCNAME\t$cname{
$field[3] }'\n";
print OUTFILE "; WARNING should read '$field[0]\t\IN\tCNAME\t$cname{
$field[3] }'\n";
}
}
if ( $add ) {
if ( $strange == 1) {
print "$field[0]\tIN\t\CNAME\t$field[3]\n";
}
print OUTFILE "$field[0]\tIN\t\CNAME\t$field[3]\n";
$changes++;
$cname{ $field[0] } = $field[3];
}
}
#########################
# MX DECLARATIONS GO HERE
#########################
# MX declarations are of the form:
# host IN MX nnn host2
#
# both host and host2 may be fully qualified domain names, though
# host, being in our domain, shouldn't need to be. In either case
# complain about any full names in ampr.org
# host2 and host can map to any names
# in theory "looping" should be avoided, but I'm not going to check
# here yet
#
if ( /[a-z0-9._-]+\tIN\tMX\t[0-9]+\t[a-z0-9._-]+/i ) {
@field = split("\t", $_ );
$add = 0; # do we add this entry to list?
$strange = 0; # do we have strange entries - if so warn
# simplest case, breakout if we've done this one (on a previous pass)
next if defined( $mx{ $field[0] . ":" . $field[4] } ) && ( $mx{
$field[0]
.. ":" . $field[4] } eq $field[3] );
# check the right hand side term is ok and has a %hostname entry
# complain about fully qualified local names
if ( $hostname{ $field[4] } ) {
$add = 1;
if ( &is_fqdn( $field[4] ) ) {
if ( &is_inthisdomain( $field[4], $domain_search) ) {
$strange = 1;
print "; WARNING '$field[4]' is fully qualified, should be
local\n";
print OUTFILE "; WARNING '$field[4]' is fully qualified, should be
local\n";
}
else {
# don't warn this is ok
# print "; WARNING '$field[3]' is outside this domain\n";
# print OUTFILE "; WARNING '$field[3]' is outside this domain\n";
}
}
}
# check the left hand-side
# if we find a $hostname entry this is an error
if ( $hostname{ $field[0] } ) {
$add = 1;
if ( &is_fqdn( $field[0] ) ) {
if ( &is_inthisdomain( $field[0], $domain_search) ) {
$strange = 1;
print "; WARNING '$field[0]' is fully qualified, should be
local\n";
print OUTFILE "; WARNING '$field[0]' is fully qualified, should be
local\n";
}
else {
# don't warn this is ok
# print "; WARNING '$field[0]' is outside this domain\n";
# print OUTFILE "; WARNING '$field[0]' is outside this domain\n";
}
}
}
if ( defined( $mx{ $field[0] . ":" . $field[4] } ) ) {
if ( $mx{ $field[0] . ":" . $field[4] } != $field[3] ) {
$strange = 1;
print "; WARNING previous definition
'$field[0]\tIN\tMX\$field[3]\t$field[4]\n";
print OUTFILE "; WARNING previous definition
'$field[0]\tIN\tMX\t$field[3]\t$field[4]\n";
$add = 1;
}
}
if ( $add ) {
if ( $strange ) {
print "$field[0]\tIN\t\MX\t$field[3]\t$field[4]\n";
}
print OUTFILE "$field[0]\tIN\t\MX\t$field[3]\t$field[4]\n";
$changes++;
$mx{ $field[0] . ":" . $field[4] } = $field[3];
}
}
}
print "; --- end of pass $pass [$changes addition(s)] ---\n";
} while ( $changes > 0 );
###################################################################
# is a fully qualified domain name?
# check for terminating "."
sub is_fqdn {
my ( $name ) = @_;
my $result = 0;
$_ = $name;
if ( /.+\.$/ ) {
$result = 1;
}
# print "is_fqdn( $name ) = $result\n";
return $result;
}
sub is_inthisdomain {
my ( $name, $ip_search ) = @_;
my $result = 0;
$ip_search .= "\.\$";
$_ = $name;
if ( /$ip_search/ ) {
$result = 1;
}
# print "is_inthisdomain( $name, $ip_search ) = $result\n";
return $result;
}
----------------- END OF PERL SCRIPT ---------------------
------------------------------
End of TCP-Group Digest V97 #5
******************************
You can send your message for this bulletin
to: tcp-group@pa2aga on .AMPR.ORG-net
or: tcpaga@pi8vnw.#zh2.nld.eu on BBS-net
------
NOT TO: pa2aga@pa2aga or pa2aga@pi8vnw.#zh2.nld.eu PLEASE!!
It will get posted automatically within a few days
Read previous mail | Read next mail
| |