From: Peter Palfrader Date: Wed, 30 Aug 2017 07:39:20 +0000 (+0000) Subject: add heavy_postfix setting in local.yaml, and set smarthosts for not-heavy-postfix... X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=68aa223e43b18e6278efc76ee233967c63d7bc2c;p=mirror%2Fdsa-puppet.git add heavy_postfix setting in local.yaml, and set smarthosts for not-heavy-postfix postfix hosts --- diff --git a/modules/debian_org/files/misc/local.yaml b/modules/debian_org/files/misc/local.yaml index 3812700c3..5bf143a92 100644 --- a/modules/debian_org/files/misc/local.yaml +++ b/modules/debian_org/files/misc/local.yaml @@ -120,6 +120,8 @@ footer: #zandonai.debian.org: "Debian s390 buildd system kindly provided by Zentrum fuer Informationsverarbeitung und Informationstechnik [zivit]" #zelenka.debian.org: "Debian s390 porter system kindly provided by Zentrum fuer Informationsverarbeitung und Informationstechnik [zivit]" host_settings: + heavy_postfix: + - bendel.debian.org heavy_exim: # mail front-ends - mailly.debian.org diff --git a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb index 6df930136..4927002df 100644 --- a/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb +++ b/modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb @@ -17,6 +17,10 @@ module Puppet::Parser::Functions unless nodeinfo['heavy_exim'] nodeinfo['smarthost'] = 'mailout.debian.org' end + elsif lookupvar('::mta') == 'postfix' + unless nodeinfo['heavy_postfix'] + nodeinfo['smarthost'] = 'mailout.debian.org' + end end nodeinfo['misc'] = {}