split out some exim::mx config into a new exim::mailrelay
[mirror/dsa-puppet.git] / modules / exim / manifests / mx.pp
index fa36ec8..0157b14 100644 (file)
@@ -1,7 +1,11 @@
 # our heavy exim class
-class exim::mx {
+# @param is_mailrelay this system is a mailrelay, both in and out, for debian hosts
+class exim::mx(
+  Boolean $is_mailrelay = false,
+){
   class { 'exim':
-    smarthost => Undef,
+    use_smarthost => false,
+    is_mailrelay  => $is_mailrelay,
   }
 
   include clamav
@@ -39,14 +43,4 @@ class exim::mx {
   package { 'monitoring-plugins-standard':
     ensure => installed,
   }
-
-  if $exim::is_mailrelay {
-    concat::fragment { 'puppet-crontab--email-virtualdomains':
-      target  => '/etc/cron.d/puppet-crontab',
-      content => @(EOF)
-        @hourly  root if [ ! -d /etc/exim4/email-virtualdomains ]; then cd /etc/exim4 && git clone mail-git:email-virtualdomains ; fi && cd /etc/exim4/email-virtualdomains && git pull --quiet --ff-only
-        | EOF
-    }
-  }
-  file { '/etc/cron.d/dsa-email-virtualdomains': ensure => absent, }
 }