2 # @param use_smarthost use the smarthost
3 # @param smarthost host to relay through (if set and use_smarthost)
4 # @param is_bugsmx this system handles bugs.debian.org
5 # @param is_mailrelay this system is a mailrelay, both in and out, for debian hosts
6 # @param is_rtmaster this system handles rt.debian.org
7 # @param is_packagesmaster this system handles packagesrt.debian.org
8 # @param is_packagesqamaster this system handles packages.qa.debian.org
9 # @param smarthost_port the port on which satellites send mail to the smarthost
11 Optional[String] $smarthost,
12 Boolean $use_smarthost = true,
13 Boolean $is_bugsmx = false,
14 Boolean $is_mailrelay = false,
15 Boolean $is_rtmaster = false,
16 Boolean $is_packagesmaster = false,
17 Boolean $is_packagesqamaster = false,
18 Integer $smarthost_port = 587,
20 include exim::vdomain::setup
21 include debian_org::mail_incoming_port
27 fail('No smarthost set but use_smarthost is true')
33 munin::check { 'ps_exim4': script => 'ps_' }
34 munin::check { 'exim_mailqueue': }
35 munin::check { 'exim_mailstats': }
37 munin::check { 'postfix_mailqueue': ensure => absent }
38 munin::check { 'postfix_mailstats': ensure => absent }
39 munin::check { 'postfix_mailvolume': ensure => absent }
41 package { 'exim4-daemon-heavy': ensure => installed }
43 Package['exim4-daemon-heavy']->Mailalias<| |>
45 concat::fragment { 'virtual_domain_template':
46 target => '/etc/exim4/virtualdomains',
47 content => template('exim/virtualdomains.erb'),
54 File['/etc/exim4/exim4.conf'],
55 Package['exim4-daemon-heavy'],
62 require => Package['exim4-daemon-heavy'],
65 file { '/etc/exim4/conf.d':
70 source => 'puppet:///files/empty/',
72 file { '/etc/exim4/ssl':
74 group => 'Debian-exim',
78 file { '/etc/exim4/exim4.conf':
79 content => template('exim/eximconf.erb'),
80 require => File['/etc/exim4/ssl/thishost.crt'],
81 notify => Service['exim4'],
83 file { '/etc/mailname':
84 content => template('exim/mailname.erb'),
86 file { '/etc/exim4/manualroute':
87 content => template('exim/manualroute.erb')
89 file { '/etc/exim4/locals':
90 content => template('exim/locals.erb')
92 file { '/etc/exim4/submission-domains':
93 content => template('exim/submission-domains.erb'),
95 file { '/etc/exim4/host_blacklist':
96 source => 'puppet:///modules/exim/common/host_blacklist',
98 file { '/etc/exim4/blacklist':
99 source => 'puppet:///modules/exim/common/blacklist',
101 file { '/etc/exim4/callout_users':
102 source => 'puppet:///modules/exim/common/callout_users',
104 file { '/etc/exim4/grey_users':
105 source => 'puppet:///modules/exim/common/grey_users',
107 file { '/etc/exim4/helo-check':
108 source => 'puppet:///modules/exim/common/helo-check',
110 file { '/etc/exim4/localusers':
111 source => 'puppet:///modules/exim/common/localusers',
113 file { '/etc/exim4/rbllist':
114 source => 'puppet:///modules/exim/common/rbllist',
116 file { '/etc/exim4/rhsbllist':
117 source => 'puppet:///modules/exim/common/rhsbllist',
119 file { '/etc/exim4/whitelist':
120 source => 'puppet:///modules/exim/common/whitelist',
122 file { '/etc/logrotate.d/exim4-base':
123 source => 'puppet:///modules/exim/common/logrotate-exim4-base',
125 file { '/etc/logrotate.d/exim4-paniclog':
126 source => 'puppet:///modules/exim/common/logrotate-exim4-paniclog'
128 file { '/etc/exim4/ssl/thishost.crt':
129 content => inline_template('<%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/" + @fqdn + ".crt") %>'),
130 group => 'Debian-exim',
133 file { '/etc/exim4/ssl/thishost.key':
134 content => inline_template('<%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/" + @fqdn + ".key") %>'),
135 group => 'Debian-exim',
138 file { '/etc/exim4/ssl/ca.crt':
139 content => inline_template('<%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/ca.crt") %>'),
140 group => 'Debian-exim',
143 file { '/etc/exim4/ssl/ca.crl':
144 content => inline_template('<%= File.read(scope().call_function("hiera", ["paths.auto_certs_dir"]) + "/ca.crl") %>'),
145 group => 'Debian-exim',
148 file { '/var/log/exim4':
151 owner => 'Debian-exim',
155 # Do we actually want this? I'm only doing it because it's harmless
156 # and makes the logs quiet. There are better ways of making logs quiet,
158 ferm::rule { 'dsa-ident':
159 domain => '(ip ip6)',
160 description => 'Allow ident access',
161 rule => '&SERVICE(tcp, 113)'
164 # These only affect the alias @$fqdn, not say, @debian.org