Edit D:\app\Administrator\product\11.2.0\dbhome_1\sysman\admin\scripts\Net-DNS-0.48\demo\mx
#!/usr/local/bin/perl -w # $Id: mx 01-jun-2005.19:13:05 afontana Exp $ =head1 NAME mx - Print a domain's MX records =head1 SYNOPSIS C<mx> I<domain> =head1 DESCRIPTION C<mx> prints a domain's MX records, sorted by preference. =head1 AUTHOR Michael Fuhr <mike@fuhr.org> =head1 SEE ALSO L<perl(1)>, L<axfr>, L<check_soa>, L<check_zone>, L<mresolv>, L<perldig>, L<Net::DNS> =cut use strict; use File::Basename; use Net::DNS; die "Usage: ", basename($0), " domain\n" unless (@ARGV == 1); my $dname = $ARGV[0]; my $res = Net::DNS::Resolver->new; my @mx = mx($res, $dname); if (@mx) { foreach my $rr (@mx) { print $rr->preference, "\t", $rr->exchange, "\n"; } } else { print "Can't find MX hosts for $dname: ", $res->errorstring, "\n"; }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de