]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Initial firma support
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Apr 2012 19:23:48 +0000 (16:23 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Apr 2012 19:23:48 +0000 (16:23 -0300)
manifests/firma.pp [new file with mode: 0644]
manifests/system.pp

diff --git a/manifests/firma.pp b/manifests/firma.pp
new file mode 100644 (file)
index 0000000..8a28ffa
--- /dev/null
@@ -0,0 +1,34 @@
+class mail::firma {
+  # Firma subsystems
+  include mail::packages::firma
+
+  postfix::config { "firma_destination_recipient_limit": value => '1', nonstandard => true }
+
+  postfix::transport { "${firma_subdomain}.$domain":
+    ensure      => present,
+    destination => "firma",
+  }
+
+  group { "firma":
+    ensure    => present,
+    allowdupe => false,
+  }
+
+  user { "firma":
+    ensure    => present,
+    allowdupe => false,
+    gid       => 'firma',
+    require   => Group['firma'],
+    home      => '/var/lib/firma',
+  }
+
+  vcsrepo { "/var/lib/firma":
+    ensure   => present,
+    provider => git,
+    source   => 'git://git.sarava.org/firma.git',
+    revision => '0d86856e51af59a670cdb96762d74031abb5025b',
+    owner    => 'firma',
+    group    => 'firma',
+    require  => [ User['firma'], Group['firma'] ],
+  }
+}
index 217e5c31e070967ba28eafd49edb97ba250921ec..a1df20f8d46ad23c401abc88c2c61e62fbf42a15 100644 (file)
@@ -5,6 +5,7 @@ class mail::system {
   $postfix_use_schleuder           = "yes"
   $postfix_use_sympa               = "yes"
   $postfix_use_mlmmj               = "yes"
+  $postfix_use_firma               = "yes"
   $postfix_anon_sasl               = "yes"
   $postfix_manage_transport_regexp = "yes"
   $postfix_manage_virtual_regexp   = "yes"
@@ -78,8 +79,20 @@ class mail::system {
     }
   }
 
+  # Firma
+  case $mail_firma {
+    true: {
+      case $firma_subdomain {
+        '': { $firma_subdomain = "firma" }
+      }
+
+      $firma_relay_domains = ", ${firma_subdomain}.${domain}"
+      include mail::firma
+    }
+  }
+
   case $postfix_relay_domains {
-    '': { $postfix_relay_domains = "${postfix_default_relay_domains}${sympa_relay_domains}${schleuder_relay_domains}${mlmmj_relay_domains}" }
+    '': { $postfix_relay_domains = "${postfix_default_relay_domains}${sympa_relay_domains}${schleuder_relay_domains}${mlmmj_relay_domains}${firma_relay_domains}" }
   }
 
   # Include base configuration