X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Ftemplates%2Fmanualroute.erb;h=8a070333bf6aace5ad8d049a4946d8257eb9176c;hb=3dcdc1b0fac9a479c63721060d9a1c56a8f1f717;hp=2965913f31d1627a869a6867c2bca971ad0d5a0c;hpb=d0c098685b92334a611a0c596a35f538b95ead47;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/templates/manualroute.erb b/modules/exim/templates/manualroute.erb index 2965913f3..8a070333b 100644 --- a/modules/exim/templates/manualroute.erb +++ b/modules/exim/templates/manualroute.erb @@ -12,7 +12,7 @@ mxmatches = [ @fqdn ] routes = [] extraroutes = [] -if scope.function_has_role(['mailrelay']) +if @is_mailrelay mxmatches << 'mailout.debian.org' mxmatches << 'INCOMING-MX' extraroutes = [ ] @@ -28,7 +28,7 @@ scope.lookupvar('deprecated::allnodeinfo').keys.sort.each do |host| mxmatch = mxregex.match(mx) if mxmatches.include?(mxmatch[1]) route = host + ":\t\t" + host - 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 != '' + if scope.lookupvar('deprecated::localinfo').has_key?(host) and scope.lookupvar('deprecated::localinfo')[host].has_key?('mail_port') and scope.lookupvar('deprecated::localinfo')[host]['mail_port'].to_s != '' route += "::" + scope.lookupvar('deprecated::localinfo')[host]['mail_port'].to_s end routes << route