eximconf: whitespace fixup
[mirror/dsa-puppet.git] / modules / postfix / manifests / init.pp
index 88591a9..4d5c31d 100644 (file)
@@ -1,16 +1,27 @@
+# postfix class
+# @param use_smarthost use the smarthost
+# @param smarthost host to relay through (if set and use_smarthost)
 class postfix(
+  Optional[String] $smarthost,
+  Boolean $use_smarthost = true,
   Boolean $manage_maincf = true,
 ) {
   package { 'postfix':
     ensure => installed
   }
 
+  if $use_smarthost {
+    if ! smarthost {
+      fail('No smarthost set but use_smarthost is true')
+    }
+  } else {
+    $heavy = true
+  }
+
   service { 'postfix':
     ensure => running
   }
 
-  include debian_org::mail_incoming_port
-
   munin::check { 'ps_exim4':       ensure => absent }
   munin::check { 'exim_mailqueue': ensure => absent }
   munin::check { 'exim_mailstats': ensure => absent }