2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
6 ## domain: hostname[::port] options
8 ## buildd.debian.org: grieg.debian.org::587 byname
11 mxmatches = [ scope.lookupvar('::fqdn') ]
15 if scope.lookupvar('site::nodeinfo')['mailrelay']
16 mxmatches << 'mailout.debian.org'
17 extraroutes = [ "keyring.debian.org:\t\tkaufmann.debian.org" ]
18 extraroutes << "www-master.debian.org:\t\twolkenstein.debian.org"
21 mxregex = Regexp.new('^\d+\s+(.*)\.$')
22 scope.lookupvar('site::allnodeinfo').keys.sort.each do |host|
23 next unless scope.lookupvar('site::allnodeinfo')[host]['mXRecord']
24 scope.lookupvar('site::allnodeinfo')[host]['mXRecord'].each do |mx|
25 mxmatch = mxregex.match(mx)
26 if mxmatches.include?(mxmatch[1])
27 route = host + ":\t\t" + host
28 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 != ''
29 route += "::" + scope.lookupvar('site::localinfo')[host]['mail_port'].to_s