## buildd.debian.org: raff.debian.org::587 byname
<%=
-routes = case fqdn
- when 'spohr.debian.org', 'draghi.debian.org' then '
-agnesi.debian.org: agnesi.debian.org::25
-agricola.debian.org: agricola.debian.org::25
-albeniz.debian.org: albeniz.debian.org::25
-ancina.debian.org: ancina.debian.org::2025
-arcadelt.debian.org: arcadelt.debian.org::25
-argento.debian.org: argento.debian.org::25
-bartok.debian.org: bartok.debian.org::25
-brahms.debian.org: brahms.debian.org::25
-caballero.debian.org: caballero.debian.org::25
-crest.debian.org: crest.debian.org::25
-dijkstra.debian.org: dijkstra.debian.org::25
-escher.debian.org: escher.debian.org::25
-fano.debian.org: fano.debian.org::25
-finzi.debian.org: finzi.debian.org::25
-geo1.debian.org: geo1.debian.org::25
-geo2.debian.org: geo2.debian.org::25
-geo3.debian.org: geo3.debian.org::25
-gluck.debian.org: gluck.debian.org::25
-goedel.debian.org: goedel.debian.org::25
-goetz.debian.org: goetz.debian.org::25
-handel.debian.org: handel.debian.org::25
-kassia.debian.org: kassia.debian.org::587
-lafayette.debian.org: lafayette.debian.org::25
-lebrun.debian.org: lebrun.debian.org::25
-leisner.debian.org: leisner.debian.org::25
-lobos.debian.org: lobos.debian.org::25
-luchesi.debian.org: luchesi.debian.org::25
-mahler.debian.org: mahler.debian.org::25
-malo.debian.org: malo.debian.org::25
-mayer.debian.org: mayer.debian.org::25
-mayr.debian.org: mayr.debian.org::25
-merulo.debian.org: merulo.debian.org::25
-morales.debian.org: morales.debian.org::25
-mundy.debian.org: mundy.debian.org::25
-murphy.debian.org: murphy.debian.org::25
-paer.debian.org: paer.debian.org::25
-penalosa.debian.org: penalosa.debian.org::25
-pergolesi.debian.org: pergolesi.debian.org::25
-peri.debian.org: peri.debian.org::25
-pescetti.debian.org: pescetti.debian.org::25
-piatti.debian.org: piatti.debian.org::2025
-praetorius.debian.org: praetorius.debian.org::25
-puccini.debian.org: puccini.debian.org::25
-rem.debian.org: rem.debian.org::25
-rore.debian.org: rore.debian.org::25
-saens.debian.org: saens.debian.org::25
-schein.debian.org: schein.debian.org::25
-schroeder.debian.org: schroeder.debian.org::25
-schumann.debian.org: schumann.debian.org::25
-senfl.debian.org: senfl.debian.org::25
-sibelius.debian.org: sibelius.debian.org::25
-smetana.debian.org: smetana.debian.org::25
-soler.debian.org: soler.debian.org::25
-sperger.debian.org: sperger.debian.org::25
-spontini.debian.org: spontini.debian.org::25
-steffani.debian.org: steffani.debian.org::25
-unger.debian.org: unger.debian.org::25
-villa.debian.org: villa.debian.org::25
-voltaire.debian.org: voltaire.debian.org::25
-wieck.debian.org: wieck.debian.org::25
-zee.debian.org: zee.debian.org::25
-zelenka.debian.org: zelenka.debian.org::25
-'
+mxmatches = [ fqdn ]
+case fqdn
+when 'spohr.debian.org', 'draghi.debian.org' then
+ mxmatches << 'mailout.debian.org'
end
-routes
+
+routes = []
+
+mxregex = Regexp.new('^\d+\s+(.*)\.$')
+mxinfo.keys.sort.each do |host|
+ mxinfo[host][0]['mXRecord'].each do |mx|
+ mxmatch = mxregex.match(mx)
+ if mxmatches.include?(mxmatch[1])
+ route = host + ":\t\t" + host
+ if localinfo.has_key?(host) and localinfo[host].has_key?('mail_port') and localinfo[host]['mail_port'].to_s != ''
+ route += "::" + localinfo[host]['mail_port'].to_s
+ end
+ routes << route
+ end
+ end
+end
+
+routes.join("\n")
%>