]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/exim/manifests/mx.pp
delete gandi-discount alias
[dsa-puppet.git] / modules / exim / manifests / mx.pp
1 class exim::mx inherits exim {
2         include clamav
3         include postgrey
4
5         file { '/etc/exim4/ccTLD.txt':
6                 source => 'puppet:///modules/exim/common/ccTLD.txt',
7         }
8         file { '/etc/exim4/surbl_whitelist.txt':
9                 source => 'puppet:///modules/exim/common/surbl_whitelist.txt',
10         }
11         file { '/etc/exim4/exim_surbl.pl':
12                 source  => 'puppet:///modules/exim/common/exim_surbl.pl',
13                 notify  => Service['exim4'],
14         }
15
16         # MXs used as smarthosts
17         @ferm::rule { 'dsa-exim-submission':
18                 description => 'Allow SMTP',
19                 rule        => '&SERVICE_RANGE(tcp, submission, $SMTP_SOURCES)'
20         }
21         @ferm::rule { 'dsa-exim-v6-submission':
22                 description => 'Allow SMTP',
23                 domain      => 'ip6',
24                 rule        => '&SERVICE_RANGE(tcp, submission, $SMTP_V6_SOURCES)',
25         }
26         dnsextras::tlsa_record{ "tlsa-submission":
27                 zone => 'debian.org',
28                 certfile => "/etc/puppet/modules/exim/files/certs/${::fqdn}.crt",
29                 port => 587,
30                 hostname => "$::fqdn",
31         }
32         package { 'nagios-plugins-standard':
33                 ensure => installed,
34         }
35
36         if has_role('mailrelay') {
37                 file { '/etc/cron.d/dsa-email-virtualdomains':
38                         source => 'puppet:///modules/exim/dsa-email-virtualdomains.cron',
39                 }
40         } else {
41                 file { '/etc/cron.d/dsa-email-virtualdomains':
42                         ensure => absent,
43                 }
44         }
45 }