Simply exim config slightly by checking for roles in manifest
[mirror/dsa-puppet.git] / modules / exim / manifests / init.pp
index 958a841..e5b051b 100644 (file)
@@ -1,5 +1,12 @@
 class exim {
 
+       $is_mailrelay = has_role('mailrelay')
+       $is_bugsmaster = has_role('bugsmaster')
+       $is_bugsmx = has_role('bugsmx')
+       $is_rtmaster = has_role('rtmaster')
+       $is_packagesmaster = has_role('packagesmaster')
+       $is_packagesqamaster = has_role('packagesqamaster')
+
        include exim::vdomain::setup
 
        munin::check { 'ps_exim4': script => 'ps_' }
@@ -36,13 +43,7 @@ class exim {
        }
        file { '/etc/exim4/Git':
                ensure  => absent,
-       }
-        # git checkouts through puppet.  yummy.
-       file { '/etc/exim4/email-virtualdomains':
-               recurse => true,
-               source => 'puppet:///modules/exim/email-virtualdomains',
-               purge  => true,
-               ignore => '.git',
+               force   => true,
        }
        file { '/etc/exim4/conf.d':
                ensure  => directory,
@@ -149,11 +150,11 @@ class exim {
                domain      => 'ip6',
                rule        => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_V6_SOURCES)"
        }
-       dnsextras::tlsa_record{ "tlsa-mailport":
-               zone => 'debian.org',
+       dnsextras::tlsa_record{ 'tlsa-mailport':
+               zone     => 'debian.org',
                certfile => "/etc/puppet/modules/exim/files/certs/${::fqdn}.crt",
-               port => "$mail_port",
-               hostname => "$::fqdn",
+               port     => $mail_port,
+               hostname => $::fqdn,
        }
 
        # Do we actually want this?  I'm only doing it because it's harmless
@@ -165,4 +166,17 @@ class exim {
                rule        => '&SERVICE(tcp, 113)'
        }
 
+       # These only affect the alias @$fqdn, not say, @debian.org
+
+       mailalias { [
+               'postmaster',
+               'hostmaster',
+               'usenet',
+               'webmaster',
+               'abuse',
+               'noc',
+               'security',
+       ]:
+               ensure => absent
+       }
 }