]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/exim/templates/manualroute.erb
add chinees spammer
[dsa-puppet.git] / modules / exim / templates / manualroute.erb
index 2b84b4ede1d4545636d64d513014aba7c901d020..40062d8dccd1e7f218624c83c22df2552a870f57 100644 (file)
@@ -12,15 +12,15 @@ mxmatches = [ fqdn ]
 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]['mXRecord'].each do |mx|
+allnodeinfo.keys.sort.each do |host|
+  next unless allnodeinfo[host]['mXRecord']
+  allnodeinfo[host]['mXRecord'].each do |mx|
     mxmatch = mxregex.match(mx)
     if mxmatches.include?(mxmatch[1])
       route = host + ":\t\t" + host