3 include exim::vdomain::setup
5 munin::check { 'ps_exim4': script => 'ps_' }
6 munin::check { 'exim_mailqueue': }
7 munin::check { 'exim_mailstats': }
9 munin::check { 'postfix_mailqueue': ensure => absent }
10 munin::check { 'postfix_mailstats': ensure => absent }
11 munin::check { 'postfix_mailvolume': ensure => absent }
13 package { 'exim4-daemon-heavy': ensure => installed }
15 Package['exim4-daemon-heavy']->Mailalias<| |>
17 concat::fragment { 'virtual_domain_template':
18 target => '/etc/exim4/virtualdomains',
19 content => template('exim/virtualdomains.erb'),
26 File['/etc/exim4/exim4.conf'],
27 Package['exim4-daemon-heavy'],
34 require => Package['exim4-daemon-heavy'],
37 file { '/etc/exim4/Git':
40 # git checkouts through puppet. yummy.
41 file { '/etc/exim4/email-virtualdomains':
43 source => 'puppet:///modules/exim/email-virtualdomains',
45 file { '/etc/exim4/conf.d':
50 source => 'puppet:///files/empty/',
52 file { '/etc/exim4/ssl':
58 file { '/etc/exim4/exim4.conf':
59 content => template('exim/eximconf.erb'),
60 require => File['/etc/exim4/ssl/thishost.crt'],
61 notify => Service['exim4'],
63 file { '/etc/mailname':
64 content => template('exim/mailname.erb'),
66 file { '/etc/exim4/manualroute':
67 content => template('exim/manualroute.erb')
69 file { '/etc/exim4/locals':
70 content => template('exim/locals.erb')
72 file { '/etc/exim4/submission-domains':
73 content => template('exim/submission-domains.erb'),
75 file { '/etc/exim4/host_blacklist':
76 source => 'puppet:///modules/exim/common/host_blacklist',
78 file { '/etc/exim4/blacklist':
79 source => 'puppet:///modules/exim/common/blacklist',
81 file { '/etc/exim4/callout_users':
82 source => 'puppet:///modules/exim/common/callout_users',
84 file { '/etc/exim4/grey_users':
85 source => 'puppet:///modules/exim/common/grey_users',
87 file { '/etc/exim4/helo-check':
88 source => 'puppet:///modules/exim/common/helo-check',
90 file { '/etc/exim4/localusers':
91 source => 'puppet:///modules/exim/common/localusers',
93 file { '/etc/exim4/rbllist':
94 source => 'puppet:///modules/exim/common/rbllist',
96 file { '/etc/exim4/rhsbllist':
97 source => 'puppet:///modules/exim/common/rhsbllist',
99 file { '/etc/exim4/whitelist':
100 source => 'puppet:///modules/exim/common/whitelist',
102 file { '/etc/logrotate.d/exim4-base':
103 source => 'puppet:///modules/exim/common/logrotate-exim4-base',
105 file { '/etc/logrotate.d/exim4-paniclog':
106 source => 'puppet:///modules/exim/common/logrotate-exim4-paniclog'
108 file { '/etc/exim4/ssl/thishost.crt':
109 source => "puppet:///modules/exim/certs/${::fqdn}.crt",
110 group => Debian-exim,
113 file { '/etc/exim4/ssl/thishost.key':
114 source => "puppet:///modules/exim/certs/${::fqdn}.key",
115 group => Debian-exim,
118 file { '/etc/exim4/ssl/ca.crt':
119 source => 'puppet:///modules/exim/certs/ca.crt',
120 group => Debian-exim,
123 file { '/etc/exim4/ssl/ca.crl':
124 source => 'puppet:///modules/exim/certs/ca.crl',
125 group => Debian-exim,
128 file { '/var/log/exim4':
131 owner => Debian-exim,
135 case getfromhash($site::nodeinfo, 'mail_port') {
136 /^(\d+)$/: { $mail_port = $1 }
137 default: { $mail_port = '25' }
140 @ferm::rule { 'dsa-exim':
141 description => 'Allow SMTP',
142 rule => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_SOURCES)"
145 @ferm::rule { 'dsa-exim-v6':
146 description => 'Allow SMTP',
148 rule => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_V6_SOURCES)"
150 dnsextras::tlsa_record{ "tlsa-mailport":
151 zone => 'debian.org',
152 certfile => "/etc/puppet/modules/exim/files/certs/${::fqdn}.crt",
153 port => "$mail_port",
154 hostname => "$::fqdn",
157 # Do we actually want this? I'm only doing it because it's harmless
158 # and makes the logs quiet. There are better ways of making logs quiet,
160 @ferm::rule { 'dsa-ident':
161 domain => '(ip ip6)',
162 description => 'Allow ident access',
163 rule => '&SERVICE(tcp, 113)'