routes = []
extraroutes = []
-case fqdn
-when 'spohr.debian.org', 'draghi.debian.org', 'merikanto.debian.org' then
+if nodeinfo['mailrelay']
mxmatches << 'mailout.debian.org'
extraroutes = [ "keyring.debian.org:\t\tkaufmann.debian.org" ]
end
mxregex = Regexp.new('^\d+\s+(.*)\.$')
mxinfo.keys.sort.each do |host|
- mxinfo[host][0]['mXRecord'].each do |mx|
+ mxinfo[host]['mXRecord'].each do |mx|
mxmatch = mxregex.match(mx)
if mxmatches.include?(mxmatch[1])
route = host + ":\t\t" + host