File: //proc/self/root/scripts.20110531.215904.25158/forcelocaldomain
#!/usr/bin/perl
# cpanel - forcelocaldomain Copyright(c) 2009 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
BEGIN { unshift @INC, '/usr/local/cpanel'; }
use Whostmgr::DNS::MX ();
my @DOMAINS = @ARGV;
if ( !@DOMAINS ) {
die "Usage: $0 [domains...]";
}
foreach my $domain (@DOMAINS) {
my %entries = Whostmgr::DNS::MX::fetchmx($domain);
print "Setting $domain to local ....";
Whostmgr::DNS::MX::checkmx( $domain, $entries{'entries'}, 1 );
print "Done\n";
}