Exclude nagios check_http from security to security-cdn redirect
[mirror/dsa-puppet.git] / modules / postfix / manifests / init.pp
1 class postfix {
2         package { 'postfix':
3                 ensure => installed
4         }
5
6         service { 'postfix':
7                 ensure => running
8         }
9
10         include debian_org::mail_incoming_port
11
12         munin::check { 'ps_exim4':       ensure => absent }
13         munin::check { 'exim_mailqueue': ensure => absent }
14         munin::check { 'exim_mailstats': ensure => absent }
15
16         munin::check { 'postfix_mailqueue': }
17         munin::check { 'postfix_mailstats': }
18         munin::check { 'postfix_mailvolume': }
19         munin::check { 'ps_smtp': script => 'ps_' }
20         munin::check { 'ps_smtpd': script => 'ps_' }
21
22         if ! has_role('lists') {
23                 concat { '/etc/postfix/main.cf':
24                         notify  => Exec['service postfix reload'],
25                 }
26                 concat::fragment { 'puppet-postfix-main.cf--header':
27                         target => '/etc/postfix/main.cf',
28                         order  => '000',
29                         content => template('postfix/main.cf-header.erb')
30                 }
31         } else {
32                 include fail2ban::postfix
33         }
34
35         exec { 'service postfix reload':
36                 path        => '/usr/bin:/usr/sbin:/bin:/sbin',
37                 command     => 'service postfix reload',
38                 refreshonly => true,
39                 require =>  Package['postfix'],
40         }
41 }