]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/exim/templates/manualroute.erb
Revert "and merge mxinfo into allnodeinfo"
[dsa-puppet.git] / modules / exim / templates / manualroute.erb
index 457d4da241405b7ff998432fbdf16220d459ed77..ce22a342b867ca9adfa9a4e5021a94d3111889da 100644 (file)
@@ -9,16 +9,17 @@
 
 <%=
 mxmatches = [ fqdn ]
-case fqdn
-when 'spohr.debian.org', 'draghi.debian.org' then 
+routes = []
+extraroutes = []
+
+if nodeinfo['mailrelay']
   mxmatches << 'mailout.debian.org'
+  extraroutes = [ "keyring.debian.org:\t\tkaufmann.debian.org" ]
 end
 
-routes = []
-
 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
@@ -30,5 +31,7 @@ mxinfo.keys.sort.each do |host|
   end
 end
 
+routes << extraroutes
+
 routes.join("\n")
 %>