Have the popcon role declare its exim virtualdomain
[mirror/dsa-puppet.git] / modules / exim / templates / manualroute.erb
index 2965913..8a07033 100644 (file)
@@ -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