X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Ftemplates%2Fmanualroute.erb;h=2965913f31d1627a869a6867c2bca971ad0d5a0c;hb=d0c098685b92334a611a0c596a35f538b95ead47;hp=a1dfb504db720daa7c8d699ac00a680486fba8d6;hpb=e3552ebafacf4e63fd4a97c331066022b7017d56;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/templates/manualroute.erb b/modules/exim/templates/manualroute.erb index a1dfb504d..2965913f3 100644 --- a/modules/exim/templates/manualroute.erb +++ b/modules/exim/templates/manualroute.erb @@ -18,17 +18,18 @@ if scope.function_has_role(['mailrelay']) extraroutes = [ ] extraroutes << "www-master.debian.org:\t\twolkenstein.debian.org" extraroutes << "tracker.debian.org:\t\tticharich.debian.org" + extraroutes << "salsa.debian.org:\t\tgodard.debian.org" end mxregex = Regexp.new('^\d+\s+(.*?)\.?$') -scope.lookupvar('site::allnodeinfo').keys.sort.each do |host| - next unless scope.lookupvar('site::allnodeinfo')[host]['mXRecord'] - scope.lookupvar('site::allnodeinfo')[host]['mXRecord'].each do |mx| +scope.lookupvar('deprecated::allnodeinfo').keys.sort.each do |host| + next unless scope.lookupvar('deprecated::allnodeinfo')[host]['mXRecord'] + scope.lookupvar('deprecated::allnodeinfo')[host]['mXRecord'].each do |mx| mxmatch = mxregex.match(mx) if mxmatches.include?(mxmatch[1]) route = host + ":\t\t" + host - if scope.lookupvar('site::localinfo').has_key?(host) and scope.lookupvar('site::localinfo')[host].has_key?('mail_port') and scope.lookupvar('site::localinfo')[host]['mail_port'].to_s != '' - route += "::" + scope.lookupvar('site::localinfo')[host]['mail_port'].to_s + if scope.lookupvar('deprecated::localinfo').has_key?(host) and scope.lookupvar('site::localinfo')[host].has_key?('mail_port') and scope.lookupvar('site::localinfo')[host]['mail_port'].to_s != '' + route += "::" + scope.lookupvar('deprecated::localinfo')[host]['mail_port'].to_s end routes << route end