protected function getmxrr($hostname, &$mxhosts, &$mxweights)
        {
            if (!Arrays::is($mxhosts)) {
                $mxhosts = array();
            }
            if (!Arrays::is($mxweights)) {
                $mxweights = array();
            }
            if (empty($hostname)) {
                return;
            }
            $cmd = 'nslookup -type=MX ' . escapeshellarg($hostname);
            if (!empty($this->mx_query_ns)) {
                $cmd .= ' ' . escapeshellarg($this->mx_query_ns);
            }
            exec($cmd, $output);
            if (empty($output)) {
                return;
            }
            $i = -1;
            foreach ($output as $line) {
                $i++;
                if (preg_match("/^$hostname\tMX preference = ([0-9]+), mail exchanger = (.+)$/i", $line, $parts)) {
                    $mxweights[$i] = trim($parts[1]);
                    $mxhosts[$i] = trim($parts[2]);
                }
                if (preg_match('/responsible mail addr = (.+)$/i', $line, $parts)) {
                    $mxweights[$i] = $i;
                    $mxhosts[$i] = trim($parts[1]);
                }
            }
            return ($i != -1);
        }