end
mxregex = Regexp.new('^\d+\s+(.*)\.$')
-ldapall.keys.sort.each do |host|
- ldapall[host]['mXRecord'].each do |mx|
+mxinfo.keys.sort.each do |host|
+ mxinfo[host]['mXRecord'].each do |mx|
mxmatch = mxregex.match(mx)
if mxmatches.include?(mxmatch[1])
route = host + ":\t\t" + host