X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Ftemplates%2Fmanualroute.erb;h=ce22a342b867ca9adfa9a4e5021a94d3111889da;hb=946c66e0abd4bba8751167d5c0d4b87fe8a8d66a;hp=4f241704c7ffc0ec56332d8e72ff9a88367c5ed4;hpb=52bc31ae7f6e7156f5931a197b05f3014ba01155;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/templates/manualroute.erb b/modules/exim/templates/manualroute.erb index 4f241704c..ce22a342b 100644 --- a/modules/exim/templates/manualroute.erb +++ b/modules/exim/templates/manualroute.erb @@ -12,15 +12,14 @@ 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][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