X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpostfix%2Fmanifests%2Finit.pp;h=67cb8d77e6273a30eb05d420fd6b5522791c5dbd;hb=ba9d4e7eceff2f88efbac2b16a4f08997ccd9d80;hp=75fdaf0f9fd53e6a671ba06f02e7e1e1723aca2e;hpb=faa394e092aa7af4c280508a215aff53ceb1db05;p=mirror%2Fdsa-puppet.git diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp index 75fdaf0f9..67cb8d77e 100644 --- a/modules/postfix/manifests/init.pp +++ b/modules/postfix/manifests/init.pp @@ -1,4 +1,14 @@ class postfix { + package { 'postfix': + ensure => installed + } + + service { 'postfix': + ensure => running + } + + include debian_org::mail_incoming_port + munin::check { 'ps_exim4': ensure => absent } munin::check { 'exim_mailqueue': ensure => absent } munin::check { 'exim_mailstats': ensure => absent } @@ -9,9 +19,21 @@ class postfix { munin::check { 'ps_smtp': script => 'ps_' } munin::check { 'ps_smtpd': script => 'ps_' } - @ferm::rule { 'smtp': - domain => '(ip ip6)', - description => 'Allow smtp access', - rule => '&SERVICE(tcp, 25)' + if ! has_role('lists') { + concat { '/etc/postfix/main.cf': + notify => Exec['service postfix reload'], + } + concat::fragment { 'puppet-postfix-main.cf--header': + target => '/etc/postfix/main.cf', + order => '000', + content => template('postfix/main.cf-header.erb') + } + } + + exec { 'service postfix reload': + path => '/usr/bin:/usr/sbin:/bin:/sbin', + command => 'service postfix reload', + refreshonly => true, + require => Package['postfix'], } }